From: Frédéric Buclin Date: Wed, 20 Oct 2010 22:50:30 +0000 (+0200) Subject: Bug 605425: Non-english templates are no longer precompiled by checksetup X-Git-Tag: bugzilla-4.0rc1~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=969901bee24a978d974f75afd342c77f2ed1a594;p=thirdparty%2Fbugzilla.git Bug 605425: Non-english templates are no longer precompiled by checksetup r/a=mkanat --- diff --git a/Bugzilla/Install/Util.pm b/Bugzilla/Install/Util.pm index 3bc10651d7..2c651988b3 100644 --- a/Bugzilla/Install/Util.pm +++ b/Bugzilla/Install/Util.pm @@ -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(); diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index afd5734f8e..83adbf4909 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -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]);