From 52c4af9cd8617c38053f92ea473e9d5c10281479 Mon Sep 17 00:00:00 2001 From: Frédéric Buclin Date: Thu, 17 Jan 2013 13:13:36 +0100 Subject: Bug 830467: Don't call _wanted_languages() when only one is available r=glob a=LpSolit --- Bugzilla/Install/Util.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Bugzilla/Install') diff --git a/Bugzilla/Install/Util.pm b/Bugzilla/Install/Util.pm index 7a7611bd1..53cc9d2ec 100644 --- a/Bugzilla/Install/Util.pm +++ b/Bugzilla/Install/Util.pm @@ -371,7 +371,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 @@ -382,7 +385,6 @@ sub include_languages { else { $wanted = _wanted_languages(); } - my $supported = supported_languages(); my $actual = _wanted_to_actual_languages($wanted, $supported); return @$actual; } -- cgit v1.2.3-24-g4f1b