Commit 72bc89ef authored by Frédéric Buclin's avatar Frédéric Buclin

Bug 851267: Bugzilla times out when a user has several thousands of votes

r=dkl a=justdave
parent 2083d285
......@@ -466,9 +466,9 @@ sub redirect_search_url {
# GET requests that lacked a list_id are always redirected. POST requests
# are only redirected if they're under the CGI_URI_LIMIT though.
my $uri_length = length($self->self_url());
if ($self->request_method() ne 'POST' or $uri_length < CGI_URI_LIMIT) {
print $self->redirect(-url => $self->self_url());
my $self_url = $self->self_url();
if ($self->request_method() ne 'POST' or length($self_url) < CGI_URI_LIMIT) {
print $self->redirect(-url => $self_url);
exit;
}
}
......@@ -522,7 +522,7 @@ sub url_is_attachment_base {
$regex =~ s/\\\%bugid\\\%/\\d+/;
}
$regex = "^$regex";
return ($self->self_url =~ $regex) ? 1 : 0;
return ($self->url =~ $regex) ? 1 : 0;
}
##########################
......
......@@ -95,8 +95,7 @@
</tr>
[% FOREACH bug = product.bugs %]
<tr [% IF bug.id == this_bug.id && canedit %]
class="bz_bug_being_voted_on" [% END %]>
<tr [% IF bug.id == this_bug.id && canedit %] class="bz_bug_being_voted_on"[% END %]>
<td>
[% IF bug.id == this_bug.id && canedit %]
[% IF product.onevoteonly %]
......@@ -106,25 +105,25 @@
[% END %]
[%- END %]
</td>
<td align="right"><a name="vote_[% bug.id FILTER html %]">
<td align="right"><a name="vote_[% bug.id FILTER none %]">
[% IF canedit %]
[% IF product.onevoteonly %]
<input type="checkbox" name="[% bug.id FILTER html %]" value="1"
[% " checked" IF bug.count %] id="bug_[% bug.id FILTER html %]">
<input type="checkbox" name="[% bug.id FILTER none %]" value="1"
[% " checked" IF bug.count %] id="bug_[% bug.id FILTER none %]">
[% ELSE %]
<input name="[% bug.id FILTER html %]" value="[% bug.count FILTER html %]"
size="2" id="bug_[% bug.id FILTER html %]">
<input name="[% bug.id FILTER none %]" value="[% bug.count FILTER html %]"
size="2" id="bug_[% bug.id FILTER none %]">
[% END %]
[% ELSE %]
[% bug.count FILTER html %]
[% END %]
</a></td>
<td align="center">
[% bug.id FILTER bug_link(bug) FILTER none %]
[% PROCESS bug/link.html.tmpl bug = bug, link_text = bug.id %]
</td>
<td>
[% bug.summary FILTER html %]
(<a href="page.cgi?id=voting/bug.html&amp;bug_id=[% bug.id FILTER uri %]">Show Votes</a>)
[% bug.short_desc FILTER html %]
(<a href="page.cgi?id=voting/bug.html&amp;bug_id=[% bug.id FILTER none %]">Show Votes</a>)
</td>
</tr>
[% END %]
......
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