projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Verwendete Lizenz eindeutig bennennen.
[kivitendo-erp.git]
/
SL
/
XIII.pm
diff --git
a/SL/XIII.pm
b/SL/XIII.pm
index
dccd435
..
75dfb61
100644
(file)
--- a/
SL/XIII.pm
+++ b/
SL/XIII.pm
@@
-11,13
+11,12
@@
package XIII;
package XIII;
-
sub retrieve_form {
$main::lxdebug->enter_sub();
my ($self, $myconfig, $form) = @_;
sub retrieve_form {
$main::lxdebug->enter_sub();
my ($self, $myconfig, $form) = @_;
- my $dbh = $form->dbconnect($myconfig);
+ my $dbh
= $form->dbconnect($myconfig);
my $query = qq|SELECT f.line
FROM xiii_forms f
WHERE f.file = '$form->{file}'
my $query = qq|SELECT f.line
FROM xiii_forms f
WHERE f.file = '$form->{file}'
@@
-25,13
+24,13
@@
sub retrieve_form {
ORDER BY f.oid|;
my $sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
ORDER BY f.oid|;
my $sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
-
+
my $ref;
my $ref;
-
+
while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
push @{ $form->{body} }, $ref->{line};
}
while ($ref = $sth->fetchrow_hashref(NAME_lc)) {
push @{ $form->{body} }, $ref->{line};
}
-
+
$sth->finish;
$dbh->disconnect;
$sth->finish;
$dbh->disconnect;
@@
-39,8
+38,6
@@
sub retrieve_form {
$main::lxdebug->leave_sub();
}
$main::lxdebug->leave_sub();
}
-
-
sub delete_form {
$main::lxdebug->enter_sub();
sub delete_form {
$main::lxdebug->enter_sub();
@@
-53,17
+50,16
@@
sub delete_form {
WHERE file = '$form->{file}'
AND dbname = '$myconfig->{dbname}'|;
$dbh->do($query) || $form->dberror($query);
WHERE file = '$form->{file}'
AND dbname = '$myconfig->{dbname}'|;
$dbh->do($query) || $form->dberror($query);
-
+
# commit and redirect
$rc = $dbh->commit;
$dbh->disconnect;
# commit and redirect
$rc = $dbh->commit;
$dbh->disconnect;
-
+
$main::lxdebug->leave_sub();
return $rc;
}
$main::lxdebug->leave_sub();
return $rc;
}
-
sub save_form {
$main::lxdebug->enter_sub();
sub save_form {
$main::lxdebug->enter_sub();
@@
-76,13
+72,11
@@
sub save_form {
WHERE file = '$form->{file}'
AND dbname = '$myconfig->{dbname}'|;
$dbh->do($query) || $form->dberror($query);
WHERE file = '$form->{file}'
AND dbname = '$myconfig->{dbname}'|;
$dbh->do($query) || $form->dberror($query);
-
-
+
$query = qq|INSERT INTO xiii_forms (line, file, dbname)
VALUES (?, '$form->{file}', '$myconfig->{dbname}')|;
$query = qq|INSERT INTO xiii_forms (line, file, dbname)
VALUES (?, '$form->{file}', '$myconfig->{dbname}')|;
-
- $sth = $dbh->prepare($query);
+ $sth = $dbh->prepare($query);
foreach $line (split /\r/, $form->{body}) {
$sth->execute($line) || $form->dberror($query);
foreach $line (split /\r/, $form->{body}) {
$sth->execute($line) || $form->dberror($query);
@@
-97,6
+91,5
@@
sub save_form {
return $rc;
}
return $rc;
}
-
1;
1;