Commit 23ac1fef authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 502682: CheckIfVotedConfirmed fails to confirm a bug if you don't have the…

Bug 502682: CheckIfVotedConfirmed fails to confirm a bug if you don't have the permissions to set status/everconfirmed - Patch by Fré©ric Buclin <LpSolit@gmail.com> r/a=mkanat
parent 03d2790c
...@@ -3373,11 +3373,17 @@ sub CheckIfVotedConfirmed { ...@@ -3373,11 +3373,17 @@ sub CheckIfVotedConfirmed {
} }
ThrowCodeError('no_open_bug_status') unless $new_status; ThrowCodeError('no_open_bug_status') unless $new_status;
$bug->set_status($new_status); # We cannot call $bug->set_status() here, because a user without
# canconfirm privs should still be able to confirm a bug by
# popular vote. We already know the new status is valid, so it's safe.
$bug->{bug_status} = $new_status;
$bug->{everconfirmed} = 1;
delete $bug->{'status'}; # Contains the status object.
} }
else { else {
# If the bug is in a closed state, only set everconfirmed to 1. # If the bug is in a closed state, only set everconfirmed to 1.
$bug->_set_everconfirmed(1); # Do not call $bug->_set_everconfirmed(), for the same reason as above.
$bug->{everconfirmed} = 1;
} }
$bug->update(); $bug->update();
......
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