]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1309884 - constants.CONCATENATE_ASSETS gets constant folded when true
authorDylan William Hardison <dylan@hardison.net>
Thu, 13 Oct 2016 14:28:08 +0000 (10:28 -0400)
committerDylan William Hardison <dylan@hardison.net>
Tue, 18 Oct 2016 16:46:04 +0000 (09:46 -0700)
Bugzilla/Template.pm
template/en/default/global/header.html.tmpl

index ce02767514825913b45cdbf843e5521a1b7bb957..10f8b4eeded9577a914c6f7d755a70f4a5a823c6 100644 (file)
@@ -450,10 +450,12 @@ sub css_files {
         }
     }
 
-    # build unified
-    $by_type{unified_standard_skin} = _concatenate_css($by_type{standard},
-                                                       $by_type{skin});
-    $by_type{unified_custom} = _concatenate_css($by_type{custom});
+    # build concatenated
+    if (CONCATENATE_ASSETS) {
+        $by_type{concatenated_standard_skin} = _concatenate_css($by_type{standard},
+                                                        $by_type{skin});
+        $by_type{concatenated_custom} = _concatenate_css($by_type{custom});
+    }
 
     return \%by_type;
 }
@@ -535,7 +537,7 @@ sub _concatenate_css {
 
 sub _css_url_rewrite {
     my ($source, $url) = @_;
-    # rewrite relative urls as the unified stylesheet lives in a different
+    # rewrite relative urls as the concatenated stylesheet lives in a different
     # directory from the source
     $url =~ s/(^['"]|['"]$)//g;
     if (substr($url, 0, 1) eq '/' || substr($url, 0, 5) eq 'data:') {
index fff74f454f81de99ba3bc48d25a0b5ca5ed175b2..bc4a424fa5445976c88f3679a2f6df7341d8a0e5 100644 (file)
     [% END %]
 
     [% SET css_sets = css_files(style_urls, yui, yui_css) %]
-    [% IF constants.CONCATENATE_ASSETS %]
-      [% PROCESS format_css_link asset_url = css_sets.unified_standard_skin %]
+    [% IF css_sets.concatenated_standard_skin %]
+      [% PROCESS format_css_link asset_url = css_sets.concatenated_standard_skin %]
     [% ELSE %]
       [% FOREACH asset_url = css_sets.standard %]
         [% PROCESS format_css_link %]
       </style>
     [% END %]
 
-    [% IF css_sets.unified_custom %]
-      [% IF constants.CONCATENATE_ASSETS %]
-        [% PROCESS format_css_link asset_url = css_sets.unified_custom %]
-      [% ELSE %]
+    [% IF css_sets.concatenated_custom %]
+        [% PROCESS format_css_link asset_url = css_sets.concatenated_custom %]
+    [% ELSE %]
         [% FOREACH asset_url = css_sets.custom %]
           [% PROCESS format_css_link %]
         [% END %]
-      [% END %]
     [% END %]
 
     [% IF NOT no_yui %]