diff options
author | lpsolit%gmail.com <> | 2007-11-15 04:56:31 +0000 |
---|---|---|
committer | lpsolit%gmail.com <> | 2007-11-15 04:56:31 +0000 |
commit | 0dadaed4ffb582ccfbc2356e7715007819d1cea2 (patch) | |
tree | a44cf83a9670d0a5e2ebc63a1dcc27a012924fc1 /votes.cgi | |
parent | Bug 183665: Accessing post_bug.cgi directly gives a weird error message and s... (diff) | |
download | bugzilla-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-x | votes.cgi | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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 }; |