summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install/Util.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/Install/Util.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/Install/Util.pm')
-rw-r--r--Bugzilla/Install/Util.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/Bugzilla/Install/Util.pm b/Bugzilla/Install/Util.pm
index bd8942507..5f6c8bceb 100644
--- a/Bugzilla/Install/Util.pm
+++ b/Bugzilla/Install/Util.pm
@@ -382,7 +382,10 @@ sub include_languages {
# Basically, the way this works is that we have a list of languages
# that we *want*, and a list of languages that Bugzilla actually
- # supports.
+ # supports. If there is only one language installed, we take it.
+ my $supported = supported_languages();
+ return @$supported if @$supported == 1;
+
my $wanted;
if ($params->{language}) {
# We can pass several languages at once as an arrayref
@@ -393,7 +396,6 @@ sub include_languages {
else {
$wanted = _wanted_languages();
}
- my $supported = supported_languages();
my $actual = _wanted_to_actual_languages($wanted, $supported);
return @$actual;
}