]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 393148 รข\80\93 Template include path used by Bugzilla/Template.pm ordered wrongly.
authorwurblzap%gmail.com <>
Wed, 22 Aug 2007 11:38:10 +0000 (11:38 +0000)
committerwurblzap%gmail.com <>
Wed, 22 Aug 2007 11:38:10 +0000 (11:38 +0000)
Follow-up warning fix patch by Marc Schumann <wurblzap@gmail.com>;
r=mkanat; a=mkanat

Bugzilla/Install/Util.pm
Bugzilla/Template.pm

index 9bab77a8a76e3c0343cdfc22272173b47b0d9ed7..cb6b27786b0d2793d4c67cb15352d263662f405f 100644 (file)
@@ -118,7 +118,7 @@ sub template_include_path {
     # we support every language installed in the template/ directory.
     
     my @wanted;
-    if (defined $params->{only_language}) {
+    if ($params->{only_language}) {
         @wanted = ($params->{only_language});
     }
     else {
index 6b53d5ae3be6b90a4c733521f1dae8b66b55ca41..863c815af7295af700d00c3ef71a84c9b30cc057 100644 (file)
@@ -85,11 +85,10 @@ sub _load_constants {
 # Templates may also be found in the extensions/ tree
 sub getTemplateIncludePath {
     my $cache = Bugzilla->request_cache;
-    my $lang  = $cache->{'language'} || undef;
+    my $lang  = $cache->{'language'} || '';
     $cache->{"template_include_path_$lang"} ||= template_include_path({
         use_languages => Bugzilla->languages,
         only_language => $lang });
-    $lang ||= '';
     return $cache->{"template_include_path_$lang"};
 }