From: Byron Jones Date: Thu, 25 Sep 2014 17:39:39 +0000 (+0800) Subject: Bug 1072110: _concatenate_js assumes javascript_urls is an array X-Git-Tag: bugzilla-4.5.6~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03c85287139860563b219ea85eb0583e7d40158b;p=thirdparty%2Fbugzilla.git Bug 1072110: _concatenate_js assumes javascript_urls is an array r=dkl,a=glob --- diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index c8f56d73da..e4c1bf4608 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -546,7 +546,8 @@ sub _css_url_rewrite { sub _concatenate_js { return @_ unless CONCATENATE_ASSETS; my ($sources) = @_; - return [] unless $sources && ref($sources); + return [] unless $sources; + $sources = ref($sources) ? $sources : [ $sources ]; my %files = map { diff --git a/template/en/default/attachment/diff-header.html.tmpl b/template/en/default/attachment/diff-header.html.tmpl index 94d2b9541b..3d491fa4e2 100644 --- a/template/en/default/attachment/diff-header.html.tmpl +++ b/template/en/default/attachment/diff-header.html.tmpl @@ -38,7 +38,7 @@ Interdiff of #[% oldid %] and #[% newid %] for [% terms.bug %] #[% bugid %] [% bugsummary FILTER html %] [% END %] [% PROCESS global/header.html.tmpl doc_section = "using.html#patch-viewer" - javascript_urls = "js/attachment.js" + javascript_urls = [ "js/attachment.js" ] style_urls = ['skins/standard/bug.css'] %] [% ELSE %] diff --git a/template/en/default/list/change-columns.html.tmpl b/template/en/default/list/change-columns.html.tmpl index 17d711eec8..c0279803cc 100644 --- a/template/en/default/list/change-columns.html.tmpl +++ b/template/en/default/list/change-columns.html.tmpl @@ -8,7 +8,7 @@ [% PROCESS global/header.html.tmpl title = "Change Columns" - javascript_urls = "js/change-columns.js" + javascript_urls = [ "js/change-columns.js" ] onload = "initChangeColumns()" %]