]> 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 22:50:30 +0000 (00:50 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Wed, 20 Oct 2010 22:50:30 +0000 (00:50 +0200)
r/a=mkanat

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

index 3bc10651d70a32e122224aeb05bbc5b8ca1d223e..2c651988b386608298a2ff437f680b414688dbd5 100644 (file)
@@ -363,7 +363,10 @@ sub include_languages {
     # supports.
     my $wanted;
     if ($params->{language}) {
-        $wanted = [$params->{language}];
+        # We can pass several languages at once as an arrayref
+        # or a single language.
+        $wanted = $params->{language};
+        $wanted = [$wanted] unless ref $wanted;
     }
     else {
         $wanted = _wanted_languages();
@@ -440,7 +443,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 afd5734f8e18c587a926099dc21238fc3cb97b8a..83adbf49098eec2dd502a33ec494a0b8e29e0a21 100644 (file)
@@ -969,7 +969,8 @@ sub precompile_templates {
 
     print install_string('template_precompile') if $output;
 
-    my $paths = template_include_path();
+    # Pre-compile all available languages.
+    my $paths = template_include_path({ language => Bugzilla->languages });
 
     foreach my $dir (@$paths) {
         my $template = Bugzilla::Template->create(include_path => [$dir]);