diff -r a4642baaf829 -r 4d4862461b8d web/wp-includes/js/tinymce/plugins/spellchecker/classes/EnchantSpell.php --- a/web/wp-includes/js/tinymce/plugins/spellchecker/classes/EnchantSpell.php Tue Feb 02 14:45:47 2010 +0000 +++ b/web/wp-includes/js/tinymce/plugins/spellchecker/classes/EnchantSpell.php Tue Feb 02 15:44:16 2010 +0000 @@ -1,67 +1,67 @@ -= 1.4.1 - * @param Array $words Array of words to check. - * @return Array of misspelled words. - */ - function &checkWords($lang, $words) { - $r = enchant_broker_init(); - - if (enchant_broker_dict_exists($r,$lang)) { - $d = enchant_broker_request_dict($r, $lang); - - $returnData = array(); - foreach($words as $key => $value) { - $correct = enchant_dict_check($d, $value); - if(!$correct) { - $returnData[] = trim($value); - } - } - - return $returnData; - enchant_broker_free_dict($d); - } else { - - } - enchant_broker_free($r); - } - - /** - * Returns suggestions for a specific word. - * - * @param String $lang Selected language code (like en_US or de_DE). Shortcodes like "en" and "de" work with enchant >= 1.4.1 - * @param String $word Specific word to get suggestions for. - * @return Array of suggestions for the specified word. - */ - function &getSuggestions($lang, $word) { - $r = enchant_broker_init(); - $suggs = array(); - - if (enchant_broker_dict_exists($r,$lang)) { - $d = enchant_broker_request_dict($r, $lang); - $suggs = enchant_dict_suggest($d, $word); - - enchant_broker_free_dict($d); - } else { - - } - enchant_broker_free($r); - - return $suggs; - } -} - += 1.4.1 + * @param Array $words Array of words to check. + * @return Array of misspelled words. + */ + function &checkWords($lang, $words) { + $r = enchant_broker_init(); + + if (enchant_broker_dict_exists($r,$lang)) { + $d = enchant_broker_request_dict($r, $lang); + + $returnData = array(); + foreach($words as $key => $value) { + $correct = enchant_dict_check($d, $value); + if(!$correct) { + $returnData[] = trim($value); + } + } + + return $returnData; + enchant_broker_free_dict($d); + } else { + + } + enchant_broker_free($r); + } + + /** + * Returns suggestions for a specific word. + * + * @param String $lang Selected language code (like en_US or de_DE). Shortcodes like "en" and "de" work with enchant >= 1.4.1 + * @param String $word Specific word to get suggestions for. + * @return Array of suggestions for the specified word. + */ + function &getSuggestions($lang, $word) { + $r = enchant_broker_init(); + $suggs = array(); + + if (enchant_broker_dict_exists($r,$lang)) { + $d = enchant_broker_request_dict($r, $lang); + $suggs = enchant_dict_suggest($d, $word); + + enchant_broker_free_dict($d); + } else { + + } + enchant_broker_free($r); + + return $suggs; + } +} + ?> \ No newline at end of file