Skip to content

Commit 7c1a336

Browse files
committed
table.html.tmpl: Use order_columns only when present (#23)
Fix a hard dependency on the BMO extension. order_columns is set in Bugzilla::Extension::BMO, which might not be present / loaded.
1 parent f0b8f4f commit 7c1a336

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

template/en/default/list/table.html.tmpl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,9 @@
102102
<th class="sorttable_nosort">&nbsp;</th>
103103
[% END %]
104104
<th colspan="[% splitheader ? 2 : 1 %]" class="first-child
105-
sorted_[% lsearch(order_columns, 'bug_id') FILTER html %]">
105+
[% order_columns.defined
106+
? 'sorted_' _ lsearch(order_columns, 'bug_id')
107+
: '' FILTER html %]">
106108
<a href="[% basepath FILTER none %]buglist.cgi?
107109
[% urlquerypart FILTER html %]&amp;order=
108110
[% PROCESS new_order id='bug_id' %]
@@ -148,7 +150,9 @@
148150
[% BLOCK columnheader %]
149151
<th colspan="[% splitheader ? 2 : 1 %]"
150152
class="sortable_column_[% key FILTER html %]
151-
sorted_[% lsearch(order_columns, id) FILTER html %]">
153+
[% order_columns.defined
154+
? 'sorted_' _ lsearch(order_columns, id)
155+
: '' FILTER html %]">
152156
<a href="[% basepath FILTER none %]buglist.cgi?[% urlquerypart FILTER html %]&amp;order=
153157
[% PROCESS new_order %]
154158
[%-#%]&amp;query_based_on=

0 commit comments

Comments
 (0)