summaryrefslogtreecommitdiffstats
path: root/whine.pl
diff options
context:
space:
mode:
authormkanat%kerio.com <>2005-02-18 06:57:26 +0100
committermkanat%kerio.com <>2005-02-18 06:57:26 +0100
commitd3f8bf365e5b93f58497a25e07fde7ce30884f9d (patch)
treeba45ba2aa22039ecd440ca4c5c7fa421eb158456 /whine.pl
parentf95d1faba79c94bcf3bf936334d6bb10e03c93b2 (diff)
downloadbugzilla-d3f8bf365e5b93f58497a25e07fde7ce30884f9d.tar.gz
bugzilla-d3f8bf365e5b93f58497a25e07fde7ce30884f9d.tar.xz
Bug 280503: Replace "LOCK/UNLOCK TABLES" with Bugzilla::DB function call
Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=mkanat,a=myk
Diffstat (limited to 'whine.pl')
-rwxr-xr-xwhine.pl13
1 files changed, 6 insertions, 7 deletions
diff --git a/whine.pl b/whine.pl
index 920b27d05..0e469e8ad 100755
--- a/whine.pl
+++ b/whine.pl
@@ -220,12 +220,11 @@ sub get_next_event {
# Loop until there's something to return
until (scalar keys %{$event}) {
- $dbh->do("LOCK TABLE " .
- "whine_schedules WRITE, " .
- "whine_events READ, " .
- "profiles READ, " .
- "groups READ, " .
- "user_group_map READ");
+ $dbh->bz_lock_tables('whine_schedules WRITE',
+ 'whine_events READ',
+ 'profiles READ',
+ 'groups READ',
+ 'user_group_map READ');
# Get the event ID for the first pending schedule
$sth_next_scheduled_event->execute;
@@ -262,7 +261,7 @@ sub get_next_event {
reset_timer($sid);
}
- $dbh->do("UNLOCK TABLES");
+ $dbh->bz_unlock_tables();
# Only set $event if the user is allowed to do whining
if ($owner->in_group('bz_canusewhines')) {