Bug 1309884 - constants.CONCATENATE_ASSETS gets constant folded when true

parent 7d445a42
...@@ -450,10 +450,12 @@ sub css_files { ...@@ -450,10 +450,12 @@ sub css_files {
} }
} }
# build unified # build concatenated
$by_type{unified_standard_skin} = _concatenate_css($by_type{standard}, if (CONCATENATE_ASSETS) {
$by_type{skin}); $by_type{concatenated_standard_skin} = _concatenate_css($by_type{standard},
$by_type{unified_custom} = _concatenate_css($by_type{custom}); $by_type{skin});
$by_type{concatenated_custom} = _concatenate_css($by_type{custom});
}
return \%by_type; return \%by_type;
} }
...@@ -535,7 +537,7 @@ sub _concatenate_css { ...@@ -535,7 +537,7 @@ sub _concatenate_css {
sub _css_url_rewrite { sub _css_url_rewrite {
my ($source, $url) = @_; 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 # directory from the source
$url =~ s/(^['"]|['"]$)//g; $url =~ s/(^['"]|['"]$)//g;
if (substr($url, 0, 1) eq '/' || substr($url, 0, 5) eq 'data:') { if (substr($url, 0, 1) eq '/' || substr($url, 0, 5) eq 'data:') {
......
...@@ -113,8 +113,8 @@ ...@@ -113,8 +113,8 @@
[% END %] [% END %]
[% SET css_sets = css_files(style_urls, yui, yui_css) %] [% SET css_sets = css_files(style_urls, yui, yui_css) %]
[% IF constants.CONCATENATE_ASSETS %] [% IF css_sets.concatenated_standard_skin %]
[% PROCESS format_css_link asset_url = css_sets.unified_standard_skin %] [% PROCESS format_css_link asset_url = css_sets.concatenated_standard_skin %]
[% ELSE %] [% ELSE %]
[% FOREACH asset_url = css_sets.standard %] [% FOREACH asset_url = css_sets.standard %]
[% PROCESS format_css_link %] [% PROCESS format_css_link %]
...@@ -130,14 +130,12 @@ ...@@ -130,14 +130,12 @@
</style> </style>
[% END %] [% END %]
[% IF css_sets.unified_custom %] [% IF css_sets.concatenated_custom %]
[% IF constants.CONCATENATE_ASSETS %] [% PROCESS format_css_link asset_url = css_sets.concatenated_custom %]
[% PROCESS format_css_link asset_url = css_sets.unified_custom %] [% ELSE %]
[% ELSE %]
[% FOREACH asset_url = css_sets.custom %] [% FOREACH asset_url = css_sets.custom %]
[% PROCESS format_css_link %] [% PROCESS format_css_link %]
[% END %] [% END %]
[% END %]
[% END %] [% END %]
[% IF NOT no_yui %] [% IF NOT no_yui %]
......
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