Commit cb7e19b4 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 383903: Voting for a bug gives a table lock error - Patch by Fré©ric…

Bug 383903: Voting for a bug gives a table lock error - Patch by Fré©ric Buclin <LpSolit@gmail.com> r=timeless a=LpSolit
parent e39ea822
...@@ -158,7 +158,7 @@ sub show_user { ...@@ -158,7 +158,7 @@ sub show_user {
my $vote_list = my $vote_list =
$dbh->selectall_arrayref('SELECT votes.bug_id, votes.vote_count, $dbh->selectall_arrayref('SELECT votes.bug_id, votes.vote_count,
bugs.short_desc, bugs.bug_status bugs.short_desc
FROM votes FROM votes
INNER JOIN bugs INNER JOIN bugs
ON votes.bug_id = bugs.bug_id ON votes.bug_id = bugs.bug_id
...@@ -168,7 +168,7 @@ sub show_user { ...@@ -168,7 +168,7 @@ sub show_user {
undef, ($who, $product->id)); undef, ($who, $product->id));
foreach (@$vote_list) { foreach (@$vote_list) {
my ($id, $count, $summary, $status) = @$_; my ($id, $count, $summary) = @$_;
$total += $count; $total += $count;
# Next if user can't see this bug. So, the totals will be correct # Next if user can't see this bug. So, the totals will be correct
...@@ -179,8 +179,7 @@ sub show_user { ...@@ -179,8 +179,7 @@ sub show_user {
push (@bugs, { id => $id, push (@bugs, { id => $id,
summary => $summary, summary => $summary,
count => $count, count => $count });
opened => is_open_state($status) });
} }
$onevoteonly = 1 if (min($product->votes_per_user, $onevoteonly = 1 if (min($product->votes_per_user,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment