From 773d8dcda5b09d88286d96b152833c0fde4d3b2d Mon Sep 17 00:00:00 2001 From: tokul Date: Fri, 20 May 2005 07:42:09 +0000 Subject: [PATCH] fix php5 mistakes and remove disabled code. disabled code might be used to make sure that list of dictionaries is correct, but it can delete old user's dictionaries. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9427 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- plugins/squirrelspell/modules/forget_me.mod | 2 +- plugins/squirrelspell/modules/forget_me_not.mod | 2 +- plugins/squirrelspell/modules/lang_change.mod | 2 +- plugins/squirrelspell/setup.php | 2 +- plugins/squirrelspell/sqspell_functions.php | 15 ++------------- 5 files changed, 6 insertions(+), 17 deletions(-) diff --git a/plugins/squirrelspell/modules/forget_me.mod b/plugins/squirrelspell/modules/forget_me.mod index b137663d..e53e0d1d 100644 --- a/plugins/squirrelspell/modules/forget_me.mod +++ b/plugins/squirrelspell/modules/forget_me.mod @@ -48,7 +48,7 @@ if (! empty($words_ary)){ $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 diff --git a/plugins/squirrelspell/modules/forget_me_not.mod b/plugins/squirrelspell/modules/forget_me_not.mod index c85dbea9..e787a145 100644 --- a/plugins/squirrelspell/modules/forget_me_not.mod +++ b/plugins/squirrelspell/modules/forget_me_not.mod @@ -40,7 +40,7 @@ if (empty($old_words)){ $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); diff --git a/plugins/squirrelspell/modules/lang_change.mod b/plugins/squirrelspell/modules/lang_change.mod index cc80c3d6..61d0b493 100644 --- a/plugins/squirrelspell/modules/lang_change.mod +++ b/plugins/squirrelspell/modules/lang_change.mod @@ -32,7 +32,7 @@ if (! sqgetGlobalVar('lang_default',$lang_default,SQ_POST)) { $new_langs = array($lang_default); foreach ($use_langs as $lang) { if (! in_array($lang,$new_langs)) { - $new_langs[].=$lang; + $new_langs[]=$lang; } } diff --git a/plugins/squirrelspell/setup.php b/plugins/squirrelspell/setup.php index f8017a37..a404a624 100644 --- a/plugins/squirrelspell/setup.php +++ b/plugins/squirrelspell/setup.php @@ -107,7 +107,7 @@ function squirrelspell_upgrade() { $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); diff --git a/plugins/squirrelspell/sqspell_functions.php b/plugins/squirrelspell/sqspell_functions.php index cbf38b99..ad871e31 100644 --- a/plugins/squirrelspell/sqspell_functions.php +++ b/plugins/squirrelspell/sqspell_functions.php @@ -305,7 +305,7 @@ function sqspell_getSettings(){ $aLangs = explode(',',$sLangs); foreach ($aLangs as $lang) { if (array_key_exists($lang,$SQSPELL_APP)) { - $ret[].=$lang; + $ret[]=$lang; } } } @@ -357,17 +357,6 @@ function sqspell_getSettings_old($words){ */ 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 @@ -442,7 +431,7 @@ function sqspell_getLang($lang) { $aWords=array(); foreach (explode(',',$sWords) as $word) { if (trim($word) !='') { - $aWords[].=trim($word); + $aWords[]=trim($word); } } return $aWords; -- 2.25.1