Revision d38eaef8
Von Sven Schöling vor mehr als 8 Jahren hinzugefügt
SL/RC.pm | ||
---|---|---|
64 | 64 |
my ($self, $myconfig, $form) = @_; |
65 | 65 |
|
66 | 66 |
# connect to database, turn AutoCommit off |
67 |
my $dbh = $form->dbconnect_noauto($myconfig);
|
|
67 |
my $dbh = SL::DB->client->dbh;
|
|
68 | 68 |
|
69 | 69 |
my ($query, @values); |
70 | 70 |
|
... | ... | |
215 | 215 |
|
216 | 216 |
$form->{PR} = selectall_hashref_query($form, $dbh, $query, @values); |
217 | 217 |
|
218 |
$dbh->disconnect; |
|
219 |
|
|
220 | 218 |
$main::lxdebug->leave_sub(); |
221 | 219 |
} |
222 | 220 |
|
... | ... | |
259 | 257 |
my ($self, $myconfig, $form) = @_; |
260 | 258 |
|
261 | 259 |
# connect to database, turn AutoCommit off |
262 |
my $dbh = $form->dbconnect_noauto($myconfig);
|
|
260 |
my $dbh = SL::DB->client->dbh;
|
|
263 | 261 |
|
264 | 262 |
my ($query, @values); |
265 | 263 |
|
... | ... | |
277 | 275 |
|
278 | 276 |
($form->{statement_balance}) = selectrow_query($form, $dbh, $query, @values); |
279 | 277 |
|
280 |
$dbh->disconnect; |
|
281 |
|
|
282 | 278 |
$main::lxdebug->leave_sub(); |
283 | 279 |
} |
284 | 280 |
|
SL/RP.pm | ||
---|---|---|
1465 | 1465 |
my ($self, $myconfig, $form) = @_; |
1466 | 1466 |
|
1467 | 1467 |
# connect to database, turn AutoCommit off |
1468 |
my $dbh = $form->dbconnect_noauto($myconfig);
|
|
1468 |
my $dbh = SL::DB->client->dbh;
|
|
1469 | 1469 |
|
1470 | 1470 |
my $ARAP = $form->{db} eq "ar" ? "AR" : "AP"; |
1471 | 1471 |
|
... | ... | |
1476 | 1476 |
WHERE link LIKE '%${ARAP}_paid%'|; |
1477 | 1477 |
$form->{PR} = selectall_hashref_query($form, $dbh, $query); |
1478 | 1478 |
|
1479 |
$dbh->disconnect; |
|
1480 |
|
|
1481 | 1479 |
$main::lxdebug->leave_sub(); |
1482 | 1480 |
} |
1483 | 1481 |
|
... | ... | |
1487 | 1485 |
my ($self, $myconfig, $form) = @_; |
1488 | 1486 |
|
1489 | 1487 |
# connect to database, turn AutoCommit off |
1490 |
my $dbh = $form->dbconnect_noauto($myconfig);
|
|
1488 |
my $dbh = SL::DB->client->dbh;
|
|
1491 | 1489 |
|
1492 | 1490 |
my $ml = 1; |
1493 | 1491 |
my $arap; |
... | ... | |
1608 | 1606 |
$sth_details->finish(); |
1609 | 1607 |
} |
1610 | 1608 |
|
1611 |
$dbh->disconnect; |
|
1612 |
|
|
1613 | 1609 |
$main::lxdebug->leave_sub(); |
1614 | 1610 |
} |
1615 | 1611 |
|
SL/User.pm | ||
---|---|---|
37 | 37 |
use IO::File; |
38 | 38 |
use Fcntl qw(:seek); |
39 | 39 |
|
40 |
use SL::DB; |
|
40 | 41 |
#use SL::Auth; |
41 | 42 |
use SL::DB::AuthClient; |
42 | 43 |
use SL::DB::Employee; |
... | ... | |
113 | 114 |
return LOGIN_AUTH_DBUPDATE_AVAILABLE() if $dbupdater_auth->unapplied_upgrade_scripts($::auth->dbconnect); |
114 | 115 |
|
115 | 116 |
# check if database is down |
116 |
my $dbh = $form->dbconnect_noauto;
|
|
117 |
my $dbh = SL::DB->client->dbh;
|
|
117 | 118 |
|
118 | 119 |
# we got a connection, check the version |
119 | 120 |
my ($dbversion) = $dbh->selectrow_array(qq|SELECT version FROM defaults|); |
bin/mozilla/gl.pl | ||
---|---|---|
528 | 528 |
my $creditcount = 0; |
529 | 529 |
my ($debitcredit, $amount); |
530 | 530 |
|
531 |
my $dbh = $form->dbconnect_noauto(\%myconfig);
|
|
531 |
my $dbh = SL::DB->client->dbh;
|
|
532 | 532 |
my ($notax_id) = selectrow_query($form, $dbh, "SELECT id FROM tax WHERE taxkey = 0 LIMIT 1", ); |
533 | 533 |
my $zerotaxes = selectall_hashref_query($form, $dbh, "SELECT id FROM tax WHERE rate = 0", ); |
534 |
$dbh->disconnect; |
|
535 | 534 |
|
536 | 535 |
my @flds = |
537 | 536 |
qw(accno debit credit projectnumber fx_transaction source memo tax taxchart); |
... | ... | |
998 | 997 |
my $debitcredit; |
999 | 998 |
my %split_safety = (); |
1000 | 999 |
|
1001 |
my $dbh = $form->dbconnect_noauto(\%myconfig);
|
|
1000 |
my $dbh = SL::DB->client->dbh;
|
|
1002 | 1001 |
my ($notax_id) = selectrow_query($form, $dbh, "SELECT id FROM tax WHERE taxkey = 0 LIMIT 1", ); |
1003 | 1002 |
my $zerotaxes = selectall_hashref_query($form, $dbh, "SELECT id FROM tax WHERE rate = 0", ); |
1004 |
$dbh->disconnect; |
|
1005 | 1003 |
|
1006 | 1004 |
my @flds = qw(accno debit credit projectnumber fx_transaction source memo tax taxchart); |
1007 | 1005 |
|
Auch abrufbar als: Unified diff
dbconnect_noauto entfernt