aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2007-11-15 04:56:31 +0000
committerlpsolit%gmail.com <>2007-11-15 04:56:31 +0000
commit0dadaed4ffb582ccfbc2356e7715007819d1cea2 (patch)
treea44cf83a9670d0a5e2ebc63a1dcc27a012924fc1 /votes.cgi
parentBug 183665: Accessing post_bug.cgi directly gives a weird error message and s... (diff)
downloadbugzilla-0dadaed4ffb582ccfbc2356e7715007819d1cea2.tar.gz
bugzilla-0dadaed4ffb582ccfbc2356e7715007819d1cea2.tar.bz2
bugzilla-0dadaed4ffb582ccfbc2356e7715007819d1cea2.zip
Bug 403824: Replace table locks in most Bugzilla files with transactions - Patch by Emmanuel Seyman <eseyman@linagora.com> r/a=mkanat
Diffstat (limited to 'votes.cgi')
-rwxr-xr-xvotes.cgi6
1 files changed, 2 insertions, 4 deletions
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 };