$new_words_ary = array();
foreach ($lang_words as $word){
if (! in_array($word,$words_ary)) {
- $new_words_ary[].= $word;
+ $new_words_ary[]=$word;
}
}
// save it
$word_dic = $new_words;
} else {
foreach($new_words as $new_word) {
- $old_words[].=$new_word;
+ $old_words[]=$new_word;
}
// make sure that dictionary contains only unique values
$word_dic = array_unique($old_words);
$new_words=array();
foreach($aLang_words as $word) {
if (! preg_match("/^#/",$word) && trim($word)!='') {
- $new_words[].=$word;
+ $new_words[]=$word;
}
}
sqspell_writeWords($new_words,$lang);
$aLangs = explode(',',$sLangs);
foreach ($aLangs as $lang) {
if (array_key_exists($lang,$SQSPELL_APP)) {
- $ret[].=$lang;
+ $ret[]=$lang;
}
}
}
*/
preg_match("/# LANG: (.*)/i", $words, $matches);
$langs=explode(", ", $matches[1]);
-
- // make sure that langs are contains values that are present in
- /*
- $rebuild_langs=array();
- foreach ($langs as $lang) {
- if (array_key_exists($lang,$SQSPELL_APP)) {
- $rebuild_langs[].=$lang;
- }
- }
- $langs=$rebuild_langs;
- */
} else {
/**
* User doesn't have a personal dictionary. Grab the default
$aWords=array();
foreach (explode(',',$sWords) as $word) {
if (trim($word) !='') {
- $aWords[].=trim($word);
+ $aWords[]=trim($word);
}
}
return $aWords;