From: Michael M Slusarz Date: Mon, 19 Oct 2009 18:50:52 +0000 (-0600) Subject: Update to new SpellChecker js code X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=b9e9f81ba00b783b5e888143344c6951ef72c3ec;p=horde.git Update to new SpellChecker js code --- 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);