Commit 878993fb authored by wurblzap%gmail.com's avatar wurblzap%gmail.com

Bug 393148 – Template include path used by Bugzilla/Template.pm ordered wrongly.

Follow-up warning fix patch by Marc Schumann <wurblzap@gmail.com>; r=mkanat; a=mkanat
parent f192744d
...@@ -118,7 +118,7 @@ sub template_include_path { ...@@ -118,7 +118,7 @@ sub template_include_path {
# we support every language installed in the template/ directory. # we support every language installed in the template/ directory.
my @wanted; my @wanted;
if (defined $params->{only_language}) { if ($params->{only_language}) {
@wanted = ($params->{only_language}); @wanted = ($params->{only_language});
} }
else { else {
......
...@@ -85,11 +85,10 @@ sub _load_constants { ...@@ -85,11 +85,10 @@ sub _load_constants {
# Templates may also be found in the extensions/ tree # Templates may also be found in the extensions/ tree
sub getTemplateIncludePath { sub getTemplateIncludePath {
my $cache = Bugzilla->request_cache; my $cache = Bugzilla->request_cache;
my $lang = $cache->{'language'} || undef; my $lang = $cache->{'language'} || '';
$cache->{"template_include_path_$lang"} ||= template_include_path({ $cache->{"template_include_path_$lang"} ||= template_include_path({
use_languages => Bugzilla->languages, use_languages => Bugzilla->languages,
only_language => $lang }); only_language => $lang });
$lang ||= '';
return $cache->{"template_include_path_$lang"}; return $cache->{"template_include_path_$lang"};
} }
......
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