diff options
author | mkanat%bugzilla.org <> | 2007-08-18 05:16:08 +0000 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2007-08-18 05:16:08 +0000 |
commit | ae89fa815ac5b6ee314c9f1194179db1c47f5abc (patch) | |
tree | 131368ca5bae3b34dc3514899f4eb7e2edd0e573 | |
parent | cca9361a1b559716240bf2489891fca0ee201b62 (diff) | |
download | bugs-ae89fa815ac5b6ee314c9f1194179db1c47f5abc.tar bugs-ae89fa815ac5b6ee314c9f1194179db1c47f5abc.tar.gz bugs-ae89fa815ac5b6ee314c9f1194179db1c47f5abc.tar.bz2 bugs-ae89fa815ac5b6ee314c9f1194179db1c47f5abc.tar.xz bugs-ae89fa815ac5b6ee314c9f1194179db1c47f5abc.zip |
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
-rw-r--r-- | Bugzilla/Template/Plugin/Hook.pm | 8 |
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) { |