diff options
author | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-02-28 15:15:43 -0800 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-02-28 15:15:43 -0800 |
commit | fc9166105862d8fa19ecb5c7c040daf62f764c95 (patch) | |
tree | a885ffae1f0998654f5ae5fe6b3e6edafdcfd643 /Bugzilla.pm | |
parent | Bug 537834 - "Buglist results using atom ctype do not display users with empt... (diff) | |
download | bugzilla-fc9166105862d8fa19ecb5c7c040daf62f764c95.tar.gz bugzilla-fc9166105862d8fa19ecb5c7c040daf62f764c95.tar.bz2 bugzilla-fc9166105862d8fa19ecb5c7c040daf62f764c95.zip |
Bug 545235: Simplify Bugzilla's language-choosing code
r=LpSolit, a=LpSolit
Diffstat (limited to 'Bugzilla.pm')
-rw-r--r-- | Bugzilla.pm | 17 |
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 { |