diff options
author | justdave%syndicomm.com <> | 2001-08-28 18:19:16 +0200 |
---|---|---|
committer | justdave%syndicomm.com <> | 2001-08-28 18:19:16 +0200 |
commit | 97505287f89aa7f4ba4584d241218abfd73a025e (patch) | |
tree | 8462dabd3bcbf3d000237c36043dca2de5d5cb3d /doeditvotes.cgi | |
parent | 3c03629bdea09944f518eb2a8af04cb70c3c5b20 (diff) | |
download | bugzilla-97505287f89aa7f4ba4584d241218abfd73a025e.tar.gz bugzilla-97505287f89aa7f4ba4584d241218abfd73a025e.tar.xz |
Re-fix for bug 87769: the original patch checked in for this prevented any votes from being changed at all. This corrects that so votes can be changed again while still trapping the error the original patch was designed to catch.
Patch by Christoper Aillon <caillon@returnzero.com>
r= justdave@syndicomm.com
Diffstat (limited to 'doeditvotes.cgi')
-rwxr-xr-x | doeditvotes.cgi | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/doeditvotes.cgi b/doeditvotes.cgi index 40d6390dd..a80f4ae40 100755 --- a/doeditvotes.cgi +++ b/doeditvotes.cgi @@ -41,21 +41,23 @@ my @buglist = grep {/^[1-9][0-9]*$/} keys(%::FORM); # If no bugs are in the buglist, let's make sure the user gets notified # that their votes will get nuked if they continue. -if ((0 == @buglist) && (! defined $::FORM{'delete_all_votes'})) { - print "Content-type: text/html\n\n"; - PutHeader("Remove your votes?"); - print "<p>You are about to remove all of your bug votes. Are you sure you wish to remove your vote from every bug you've voted on?</p>"; - print qq{<form action="doeditvotes.cgi" method="post">\n}; - print qq{<p><input type="radio" name="delete_all_votes" value="1"> Yes</p>\n}; - print qq{<p><input type="radio" name="delete_all_votes" value="0" checked="checked"> No</p>\n}; - print qq{<p><a href="showvotes.cgi">Review your votes</a></p>\n}; - print qq{<p><input type="submit" value="Submit"></p></form>\n}; - PutFooter(); - exit(); -} -elsif ($::FORM{'delete_all_votes'} == 0) { - print "Location: showvotes.cgi\n\n"; - exit(); +if ((0 == @buglist) { + if (! defined $::FORM{'delete_all_votes'})) { + print "Content-type: text/html\n\n"; + PutHeader("Remove your votes?"); + print "<p>You are about to remove all of your bug votes. Are you sure you wish to remove your vote from every bug you've voted on?</p>"; + print qq{<form action="doeditvotes.cgi" method="post">\n}; + print qq{<p><input type="radio" name="delete_all_votes" value="1"> Yes</p>\n}; + print qq{<p><input type="radio" name="delete_all_votes" value="0" checked="checked"> No</p>\n}; + print qq{<p><a href="showvotes.cgi">Review your votes</a></p>\n}; + print qq{<p><input type="submit" value="Submit"></p></form>\n}; + PutFooter(); + exit(); + } + elsif ($::FORM{'delete_all_votes'} == 0)) { + print "Location: showvotes.cgi\n\n"; + exit(); + } } # Call ValidateBugID on each bug ID to make sure it is a positive |