From 0dadaed4ffb582ccfbc2356e7715007819d1cea2 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Thu, 15 Nov 2007 04:56:31 +0000 Subject: Bug 403824: Replace table locks in most Bugzilla files with transactions - Patch by Emmanuel Seyman r/a=mkanat --- votes.cgi | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'votes.cgi') diff --git a/votes.cgi b/votes.cgi index 9fe94484a..4b26229a5 100755 --- a/votes.cgi +++ b/votes.cgi @@ -130,9 +130,7 @@ sub show_user { my $canedit = (Bugzilla->params->{'usevotes'} && $userid == $who) ? 1 : 0; - $dbh->bz_lock_tables('bugs READ', 'products READ', 'votes WRITE', - 'cc READ', 'bug_group_map READ', 'user_group_map READ', - 'group_group_map READ', 'groups READ', 'group_control_map READ'); + $dbh->bz_start_transaction(); if ($canedit && $bug_id) { # Make sure there is an entry for this bug @@ -197,7 +195,7 @@ sub show_user { } $dbh->do('DELETE FROM votes WHERE vote_count <= 0'); - $dbh->bz_unlock_tables(); + $dbh->bz_commit_transaction(); $vars->{'canedit'} = $canedit; $vars->{'voting_user'} = { "login" => $name }; -- cgit v1.2.3-24-g4f1b