X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fsquirrelspell%2Fmodules%2Fforget_me.mod;h=b48b549a474fbc2e456797812814681d5ecfc8bc;hp=129c3af9aa4ace4f74514ecd0d0748e37970baf7;hb=HEAD;hpb=74091b64ffddec9db154d7a76c202b98401b1117 diff --git a/plugins/squirrelspell/modules/forget_me.mod b/plugins/squirrelspell/modules/forget_me.mod index 129c3af9..875d0827 100644 --- a/plugins/squirrelspell/modules/forget_me.mod +++ b/plugins/squirrelspell/modules/forget_me.mod @@ -1,85 +1,65 @@ ($Author$) - * @version $Date$ + * @author Konstantin Riabitsev + * @copyright 1999-2022 The SquirrelMail Project Team + * @license http://opensource.org/licenses/gpl-license.php GNU Public License + * @version $Id$ + * @package plugins + * @subpackage squirrelspell */ -global $SQSPELL_VERSION; +global $SQSPELL_VERSION, $SQSPELL_APP_DEFAULT; -$words_ary = $_POST['words_ary']; -$sqspell_use_app = $_POST['sqspell_use_app']; +if (! sqgetGlobalVar('words_ary',$words_ary,SQ_POST) || ! is_array($words_ary)) { + $words_ary = array(); +} + +if (! sqgetGlobalVar('sqspell_use_app',$sqspell_use_app,SQ_POST)){ + $sqspell_use_app = $SQSPELL_APP_DEFAULT; +} /** * If something needs to be deleted, then $words_ary will be * non-zero length. */ -if (sizeof($words_ary)){ - $words=sqspell_getWords(); - $lang_words = sqspell_getLang($words, $sqspell_use_app); +if (! empty($words_ary)){ + $lang_words = sqspell_getLang($sqspell_use_app); $msg = '

' . sprintf(_("Deleting the following entries from %s dictionary:"), ''.$sqspell_use_app.'') . '

' . "