]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 605425: Non-english templates are no longer precompiled by checksetup
authorFrédéric Buclin <LpSolit@gmail.com>
Wed, 20 Oct 2010 23:13:27 +0000 (01:13 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Wed, 20 Oct 2010 23:13:27 +0000 (01:13 +0200)
r/a=mkanat

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

index 66658ff244c322fea89002a45c58bf7204482ed9..6d1a4c93b960f84e7301c0fb36932d3ba190a3a9 100644 (file)
@@ -313,7 +313,14 @@ sub include_languages {
     
     my @wanted;
     if ($params->{only_language}) {
-        @wanted = ($params->{only_language});
+        # We can pass several languages at once as an arrayref
+        # or a single language.
+        if (ref $params->{only_language}) {
+            @wanted = @{ $params->{only_language} };
+        }
+        else {
+            @wanted = ($params->{only_language});
+        }
     }
     else {
         @wanted = _sort_accept_language($ENV{'HTTP_ACCEPT_LANGUAGE'} || '');
@@ -434,7 +441,7 @@ sub _template_base_directories {
 
 sub template_include_path {
     my ($params) = @_;
-    my @used_languages = include_languages(@_);
+    my @used_languages = include_languages($params);
     # Now, we add template directories in the order they will be searched:
     my $template_dirs = _template_base_directories(); 
 
index 88d3700e9a0af35d569feadeae95eebd0049a247..ad81d5e44b1d0af5c2d5b32cffedadcc25c16cc7 100644 (file)
@@ -823,7 +823,8 @@ sub precompile_templates {
 
     print install_string('template_precompile') if $output;
 
-    my $paths = template_include_path({ use_languages => Bugzilla->languages });
+    my $paths = template_include_path({ use_languages => Bugzilla->languages,
+                                        only_language => Bugzilla->languages });
 
     foreach my $dir (@$paths) {
         my $template = Bugzilla::Template->create(include_path => [$dir]);