summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Template.pm
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2013-01-17 13:13:36 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2013-01-17 13:13:36 +0100
commit52c4af9cd8617c38053f92ea473e9d5c10281479 (patch)
tree3f260eeb8ca1cb3974c688b8a0917f67ccbb2713 /Bugzilla/Template.pm
parentd8643908a7d6243c361e670573af763067db408d (diff)
downloadbugzilla-52c4af9cd8617c38053f92ea473e9d5c10281479.tar.gz
bugzilla-52c4af9cd8617c38053f92ea473e9d5c10281479.tar.xz
Bug 830467: Don't call _wanted_languages() when only one is available
r=glob a=LpSolit
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r--Bugzilla/Template.pm11
1 files changed, 3 insertions, 8 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index b93e1bfae..81d01b426 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -881,14 +881,9 @@ sub create {
# Currently logged in user, if any
# If an sudo session is in progress, this is the user we're faking
'user' => sub { return Bugzilla->user; },
-
+
# Currenly active language
- # XXX Eventually this should probably be replaced with something
- # like Bugzilla->language.
- 'current_language' => sub {
- my ($language) = include_languages();
- return $language;
- },
+ 'current_language' => sub { return Bugzilla->current_language; },
# If an sudo session is in progress, this is the user who
# started the session.
@@ -899,7 +894,7 @@ sub create {
# Allow templates to access docs url with users' preferred language
'docs_urlbase' => sub {
- my ($language) = include_languages();
+ my $language = Bugzilla->current_language;
my $docs_urlbase = Bugzilla->params->{'docs_urlbase'};
$docs_urlbase =~ s/\%lang\%/$language/;
return $docs_urlbase;