summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Template
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2007-08-18 07:16:08 +0200
committermkanat%bugzilla.org <>2007-08-18 07:16:08 +0200
commitae89fa815ac5b6ee314c9f1194179db1c47f5abc (patch)
tree131368ca5bae3b34dc3514899f4eb7e2edd0e573 /Bugzilla/Template
parentcca9361a1b559716240bf2489891fca0ee201b62 (diff)
downloadbugzilla-ae89fa815ac5b6ee314c9f1194179db1c47f5abc.tar.gz
bugzilla-ae89fa815ac5b6ee314c9f1194179db1c47f5abc.tar.xz
Bug 390756: Hook.pm couldn't find Bugzilla::Template::sortAcceptLanguage, because it didn't exist anymore.
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, r=Wurblzap, a=LpSolit
Diffstat (limited to 'Bugzilla/Template')
-rw-r--r--Bugzilla/Template/Plugin/Hook.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/Bugzilla/Template/Plugin/Hook.pm b/Bugzilla/Template/Plugin/Hook.pm
index a5eec820b..b1f27990e 100644
--- a/Bugzilla/Template/Plugin/Hook.pm
+++ b/Bugzilla/Template/Plugin/Hook.pm
@@ -26,6 +26,7 @@ package Bugzilla::Template::Plugin::Hook;
use strict;
use Bugzilla::Constants;
+use Bugzilla::Install::Util;
use Bugzilla::Template;
use Bugzilla::Util;
use Bugzilla::Error;
@@ -110,8 +111,11 @@ sub getLanguages() {
if (not ($languages =~ /,/)) { # only one language
return $languages;
}
- my @languages = Bugzilla::Template::sortAcceptLanguage($languages);
- my @accept_language = Bugzilla::Template::sortAcceptLanguage($ENV{'HTTP_ACCEPT_LANGUAGE'} || "" );
+ # XXX This should probably be re-worked so that we don't have to
+ # reach into the internals of another module to get languages.
+ my @languages = Bugzilla::Install::Util::_sort_accept_language($languages);
+ my @accept_language = Bugzilla::Install::Util::_sort_accept_language(
+ $ENV{'HTTP_ACCEPT_LANGUAGE'} || "" );
my @usedlanguages;
foreach my $lang (@accept_language) {
if(my @found = grep /^\Q$lang\E(-.+)?$/i, @languages) {