From b9e9f81ba00b783b5e888143344c6951ef72c3ec Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Mon, 19 Oct 2009 12:50:52 -0600 Subject: [PATCH] Update to new SpellChecker js code --- framework/Ajax/lib/Horde/Ajax/Imple/SpellChecker.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/framework/Ajax/lib/Horde/Ajax/Imple/SpellChecker.php b/framework/Ajax/lib/Horde/Ajax/Imple/SpellChecker.php index 29ecfc6a4..ba6d1ba66 100644 --- a/framework/Ajax/lib/Horde/Ajax/Imple/SpellChecker.php +++ b/framework/Ajax/lib/Horde/Ajax/Imple/SpellChecker.php @@ -41,12 +41,14 @@ class Horde_Ajax_Imple_SpellChecker extends Horde_Ajax_Imple_Base $params['states'] = Horde_Serialize::serialize($params['states'], Horde_Serialize::JSON, Horde_Nls::getCharset()); } if (empty($params['locales'])) { + $key_list = array_keys(Horde_Nls::$config['spelling']); + asort($key_list, SORT_LOCALE_STRING); $params['locales'] = array(); - foreach (array_keys(Horde_Nls::$config['spelling']) as $lcode) { - $params['locales'][$lcode] = Horde_Nls::$config['languages'][$lcode]; + + foreach ($key_list as $lcode) { + $params['locales'][] = array('l' => Horde_Nls::$config['languages'][$lcode], 'v' => $lcode); } } - asort($params['locales'], SORT_LOCALE_STRING); $params['locales'] = Horde_Serialize::serialize($params['locales'], Horde_Serialize::JSON, Horde_Nls::getCharset()); parent::__construct($params); -- 2.11.0