Commit 3566e55c authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 383643: When using "Find a specific bug", the generated buglist does not let…

Bug 383643: When using "Find a specific bug", the generated buglist does not let you change the sort order - Patch by Alex Schuilenburg <alex@schuilenburg.org> r/a=LpSolit
parent 6724564e
......@@ -965,7 +965,7 @@ if (defined $cgi->param('limit')) {
}
elsif ($fulltext) {
$query .= " " . $dbh->sql_limit(FULLTEXT_BUGLIST_LIMIT);
$vars->{'sorted_by_relevance'} = 1;
$vars->{'message'} = 'buglist_sorted_by_relevance' if ($cgi->param('order') =~ /^relevance/);
}
......
......@@ -36,7 +36,6 @@
[% END %]
[% qorder = order FILTER url_quote IF order %]
[% message = "buglist_sorted_by_relevance" IF sorted_by_relevance %]
[%############################################################################%]
......
......@@ -85,18 +85,14 @@
<th>&nbsp;</th>
[% END %]
<th colspan="[% splitheader ? 2 : 1 %]" class="first-child">
[% IF sorted_by_relevance %]
ID
[% ELSE %]
[% desc = '' %]
[% IF (om = order.match("^bugs\.bug_id( desc)?")) %]
[% desc = ' desc' IF NOT om.0 %]
[% END %]
<a href="buglist.cgi?
[% urlquerypart FILTER html %]&amp;order=bugs.bug_id[% desc FILTER url_quote %]
[%-#%]&amp;query_based_on=
[% defaultsavename OR searchname FILTER url_quote %]">ID</a>
[% desc = '' %]
[% IF (om = order.match("^bugs\.bug_id( desc)?")) %]
[% desc = ' desc' IF NOT om.0 %]
[% END %]
<a href="buglist.cgi?
[% urlquerypart FILTER html %]&amp;order=bugs.bug_id[% desc FILTER url_quote %]
[%-#%]&amp;query_based_on=
[% defaultsavename OR searchname FILTER url_quote %]">ID</a>
</th>
[% IF splitheader %]
......@@ -133,28 +129,24 @@
[% BLOCK columnheader %]
<th colspan="[% splitheader ? 2 : 1 %]">
[% IF sorted_by_relevance %]
[%- abbrev.$id.title || field_descs.$id || column.title -%]
[% IF column.name.match('\s+AS\s+') %]
[%# For aliased columns, use their ID for sorting. %]
[% column.sortalias = id %]
[% ELSE %]
[% IF column.name.match('\s+AS\s+') %]
[%# For aliased columns, use their ID for sorting. %]
[% column.sortalias = id %]
[% ELSE %]
[%# Other columns may sort on their name directly. %]
[% column.sortalias = column.name %]
[% END %]
[% desc = '' %]
[% IF (om = order.match("$column.sortalias( desc)?")) %]
[% desc = ' desc' IF NOT om.0 %]
[% END %]
[% order = order.remove("$column.sortalias( desc)?,?") %]
<a href="buglist.cgi?[% urlquerypart FILTER html %]&amp;order=
[% column.sortalias FILTER url_quote %][% desc FILTER url_quote %]
[% ",$order" FILTER url_quote IF order %]
[%-#%]&amp;query_based_on=
[% defaultsavename OR searchname FILTER url_quote %]">
[%- abbrev.$id.title || field_descs.$id || column.title -%]</a>
[%# Other columns may sort on their name directly. %]
[% column.sortalias = column.name %]
[% END %]
[% desc = '' %]
[% IF (om = order.match("$column.sortalias( desc)?")) %]
[% desc = ' desc' IF NOT om.0 %]
[% END %]
[% order = order.remove("$column.sortalias( desc)?,?") %]
<a href="buglist.cgi?[% urlquerypart FILTER html %]&amp;order=
[% column.sortalias FILTER url_quote %][% desc FILTER url_quote %]
[% ",$order" FILTER url_quote IF order %]
[%-#%]&amp;query_based_on=
[% defaultsavename OR searchname FILTER url_quote %]">
[%- abbrev.$id.title || field_descs.$id || column.title -%]</a>
</th>
[% 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