Revision d57c45b5
Von Sven Schöling vor mehr als 13 Jahren hinzugefügt
SL/Drafts.pm | ||
---|---|---|
45 | 45 |
|
46 | 46 |
my ($dbh, $sth, $query, %saved, $dumped); |
47 | 47 |
|
48 |
$dbh = $form->dbconnect_noauto($myconfig); |
|
48 |
$dbh = $form->get_standard_dbh; |
|
49 |
$dbh->begin_work; |
|
49 | 50 |
|
50 | 51 |
my ($module, $submodule) = $self->get_module($form); |
51 | 52 |
|
... | ... | |
72 | 73 |
do_query($form, $dbh, $query, $draft_description, $dumped, $form->{login}, $draft_id); |
73 | 74 |
|
74 | 75 |
$dbh->commit(); |
75 |
$dbh->disconnect(); |
|
76 | 76 |
|
77 | 77 |
$form->{draft_id} = $draft_id; |
78 | 78 |
$form->{draft_description} = $draft_description; |
... | ... | |
87 | 87 |
|
88 | 88 |
my ($dbh, $sth, $query, @values); |
89 | 89 |
|
90 |
$dbh = $form->dbconnect($myconfig);
|
|
90 |
$dbh = $form->get_standard_dbh;
|
|
91 | 91 |
|
92 | 92 |
$query = qq|SELECT id, description, form FROM drafts WHERE id = ?|; |
93 | 93 |
|
... | ... | |
98 | 98 |
} |
99 | 99 |
$sth->finish(); |
100 | 100 |
|
101 |
$dbh->disconnect(); |
|
102 |
|
|
103 | 101 |
$main::lxdebug->leave_sub(); |
104 | 102 |
|
105 | 103 |
return @values; |
... | ... | |
114 | 112 |
|
115 | 113 |
my ($dbh, $sth, $query); |
116 | 114 |
|
117 |
$dbh = $form->dbconnect($myconfig);
|
|
115 |
$dbh = $form->get_standard_dbh;
|
|
118 | 116 |
|
119 | 117 |
$query = qq|DELETE FROM drafts WHERE id IN (| . join(", ", map { "?" } @draft_ids) . qq|)|; |
120 | 118 |
do_query($form, $dbh, $query, @draft_ids); |
121 | 119 |
|
122 |
$dbh->disconnect(); |
|
123 |
|
|
124 | 120 |
$main::lxdebug->leave_sub(); |
125 | 121 |
} |
126 | 122 |
|
Auch abrufbar als: Unified diff
Drafts: dbconnects in get_standard_dbh geändert.