]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 172010 voting broken on tip
authorbugreport%peshkin.net <>
Wed, 2 Oct 2002 07:46:22 +0000 (07:46 +0000)
committerbugreport%peshkin.net <>
Wed, 2 Oct 2002 07:46:22 +0000 (07:46 +0000)
Regression from 43600 and 157756
2xr=bbaetz

CGI.pl
votes.cgi

diff --git a/CGI.pl b/CGI.pl
index 5360d155f88a4c053d2ba949cf286fd9ea762f3b..f4a9813f03a9954d9fe2a2159717ae6c63136808 100644 (file)
--- a/CGI.pl
+++ b/CGI.pl
@@ -904,7 +904,7 @@ sub CheckIfVotedConfirmed {
     SendSQL("SELECT bugs.votes, bugs.bug_status, products.votestoconfirm, " .
             "       bugs.everconfirmed " .
             "FROM bugs, products " .
-            "WHERE bugs.bug_id = $id AND products.product_id = bugs.product_id");
+            "WHERE bugs.bug_id = $id AND products.id = bugs.product_id");
     my ($votes, $status, $votestoconfirm, $everconfirmed) = (FetchSQLData());
     if ($votes >= $votestoconfirm && $status eq $::unconfirmedstate) {
         SendSQL("UPDATE bugs SET bug_status = 'NEW', everconfirmed = 1 " .
index 3bfe11682684bff53bf25d976c93c853868ef658..52dfb0f5c4b0eb9428b961858813047af2f89a13 100755 (executable)
--- a/votes.cgi
+++ b/votes.cgi
@@ -134,6 +134,7 @@ sub show_user {
     my $canedit = 1 if ($name eq $::COOKIE{'Bugzilla_login'});
     
     SendSQL("LOCK TABLES bugs READ, products READ, votes WRITE,
+             cc READ, bug_group_map READ, user_group_map READ,
              cc AS selectVisible_cc READ");
     
     if ($canedit && $bug_id) {
@@ -314,7 +315,8 @@ sub record_votes {
     # for products that only allow one vote per bug).  In that case, we still
     # need to clear the user's votes from the database.
     my %affected;
-    SendSQL("LOCK TABLES bugs write, votes write, products read");
+    SendSQL("LOCK TABLES bugs write, votes write, products read, cc read,
+             user_group_map read, bug_group_map read");
     
     # Take note of, and delete the user's old votes from the database.
     SendSQL("SELECT bug_id FROM votes WHERE who = $who");