From ae89fa815ac5b6ee314c9f1194179db1c47f5abc Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Sat, 18 Aug 2007 05:16:08 +0000 Subject: Bug 390756: Hook.pm couldn't find Bugzilla::Template::sortAcceptLanguage, because it didn't exist anymore. Patch By Max Kanat-Alexander r=LpSolit, r=Wurblzap, a=LpSolit --- Bugzilla/Template/Plugin/Hook.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Bugzilla/Template/Plugin') 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) { -- cgit v1.2.3-24-g4f1b