Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 805e8da4

Von Sven Schöling vor fast 18 Jahren hinzugefügt

  • ID 805e8da4fc4c631f7d62286fa63d8a5e69e769ab
  • Vorgänger 0b8580e2
  • Nachfolger 0ecb3198

zusaetzlich zu der vorhandenen has_storno funktion (bugfix)
eine is_storno funktion die die halbherzigen checks auf das mitgeschleifte $form->{storno} ersetzt

Unterschiede anzeigen:

SL/IS.pm
my $dbh = $form->dbconnect($myconfig);
my $query = qq|SELECT storno FROM $table WHERE storno_id = ?|;
my ($result) = selectrow_query($form, $dbh, $query, $form->{id});
$dbh->disconnect();
$main::lxdebug->leave_sub();
return $result;
}
sub is_storno {
$main::lxdebug->enter_sub();
my ($self, $myconfig, $form, $table) = @_;
$main::lxdebug->leave_sub() and return 0 unless ($form->{id});
# make sure there's no funny stuff in $table
# ToDO: die when this happens and throw an error
$main::lxdebug->leave_sub() and return 0 if ($table =~ /\W/);
my $dbh = $form->dbconnect($myconfig);
my $query = qq|SELECT storno FROM $table WHERE id = ?|;
my ($result) = selectrow_query($form, $dbh, $query, $form->{id});

Auch abrufbar als: Unified diff