summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Template.pm
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2013-01-17 22:19:47 +0100
committerDave Lawrence <dlawrence@mozilla.com>2013-01-17 22:19:47 +0100
commit22f1b7eb4d32020ca57739266516705e7ece6457 (patch)
treec01f03d4a4addea9513260324a6c41e5a6647b63 /Bugzilla/Template.pm
parentcd8de94df32638ec7d982d743171db809901205b (diff)
downloadbugzilla-22f1b7eb4d32020ca57739266516705e7ece6457.tar.gz
bugzilla-22f1b7eb4d32020ca57739266516705e7ece6457.tar.xz
Bug 830467 - Don't call _wanted_languages() when only one is available
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 5ef7ed1c6..b19943b03 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -871,14 +871,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.
@@ -889,7 +884,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;