summaryrefslogtreecommitdiffstats
path: root/Bugzilla.pm
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-03-01 00:15:43 +0100
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-03-01 00:15:43 +0100
commitfc9166105862d8fa19ecb5c7c040daf62f764c95 (patch)
treea885ffae1f0998654f5ae5fe6b3e6edafdcfd643 /Bugzilla.pm
parentbb2b0198824b22e7d333f7938494be4a5a4ef7c0 (diff)
downloadbugzilla-fc9166105862d8fa19ecb5c7c040daf62f764c95.tar.gz
bugzilla-fc9166105862d8fa19ecb5c7c040daf62f764c95.tar.xz
Bug 545235: Simplify Bugzilla's language-choosing code
r=LpSolit, a=LpSolit
Diffstat (limited to 'Bugzilla.pm')
-rw-r--r--Bugzilla.pm17
1 files changed, 1 insertions, 16 deletions
diff --git a/Bugzilla.pm b/Bugzilla.pm
index 9f4e81cb6..fb640091e 100644
--- a/Bugzilla.pm
+++ b/Bugzilla.pm
@@ -417,22 +417,7 @@ sub dbh_main {
sub languages {
my $class = shift;
- return $class->request_cache->{languages}
- if $class->request_cache->{languages};
-
- my @files = glob(catdir(bz_locations->{'templatedir'}, '*'));
- my @languages;
- foreach my $dir_entry (@files) {
- # It's a language directory only if it contains "default" or
- # "custom". This auto-excludes CVS directories as well.
- next unless (-d catdir($dir_entry, 'default')
- || -d catdir($dir_entry, 'custom'));
- $dir_entry = basename($dir_entry);
- # Check for language tag format conforming to RFC 1766.
- next unless $dir_entry =~ /^[a-zA-Z]{1,8}(-[a-zA-Z]{1,8})?$/;
- push(@languages, $dir_entry);
- }
- return $class->request_cache->{languages} = \@languages;
+ return Bugzilla::Install::Util::supported_languages();
}
sub error_mode {