summaryrefslogtreecommitdiffstats
path: root/template/en
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2005-12-21 06:58:32 +0100
committerlpsolit%gmail.com <>2005-12-21 06:58:32 +0100
commitbe43d4b573f7cebb627e88b46212c0903acf7c7b (patch)
tree2d794e9beb81f6fe62f4b41d91ef7fd0daaac2bc /template/en
parent85731f09a6374f82ee6b1efcffa236068b643a3c (diff)
downloadbugzilla-be43d4b573f7cebb627e88b46212c0903acf7c7b.tar.gz
bugzilla-be43d4b573f7cebb627e88b46212c0903acf7c7b.tar.xz
Bug 302326: Column sort links in bug lists should use field IDs instead of names - Patch by Marc Schumann <wurblzap@gmail.com> r=LpSolit a=justdave
Diffstat (limited to 'template/en')
-rw-r--r--template/en/default/list/table.html.tmpl9
1 files changed, 8 insertions, 1 deletions
diff --git a/template/en/default/list/table.html.tmpl b/template/en/default/list/table.html.tmpl
index d3fe3231b..7ef53058a 100644
--- a/template/en/default/list/table.html.tmpl
+++ b/template/en/default/list/table.html.tmpl
@@ -131,8 +131,15 @@
[% IF sorted_by_relevance %]
[%- abbrev.$id.title || field_descs.$id || column.title -%]
[% 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 %]
<a href="buglist.cgi?[% urlquerypart FILTER html %]&amp;order=
- [% column.name FILTER url_quote FILTER html %]
+ [% column.sortalias FILTER url_quote FILTER html %]
[% ",$qorder" FILTER html IF order %]
[%-#%]&amp;query_based_on=
[% defaultsavename OR searchname FILTER html %]">