X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=plugins%2Fsquirrelspell%2Fsqspell_functions.php;h=43a0313346f890afc1fa0972d6c0002be78cd63b;hb=dcc1cc825e550711d0207a737f9ea3ac2b38e923;hp=a3acfeb0400f681f74845a22681d64f403ae4b77;hpb=8a9f9d0964e91d21ffd490b105a011687d8c729f;p=squirrelmail.git diff --git a/plugins/squirrelspell/sqspell_functions.php b/plugins/squirrelspell/sqspell_functions.php index a3acfeb0..43a03133 100644 --- a/plugins/squirrelspell/sqspell_functions.php +++ b/plugins/squirrelspell/sqspell_functions.php @@ -4,13 +4,15 @@ * ---------------------- * All SquirrelSpell-wide functions are in this file. * - * Copyright (c) 1999-2002 The SquirrelMail development team + * Copyright (c) 1999-2003 The SquirrelMail development team * Licensed under the GNU GPL. For full terms see the file COPYING. * * $Id$ * * @author Konstantin Riabitsev ($Author$) * @version $Date$ + * @package plugins + * @subpackage squirrelspell */ /** @@ -28,13 +30,7 @@ function sqspell_makePage($title, $scriptsrc, $body){ global $color, $SQSPELL_VERSION; - if ( (float)substr(PHP_VERSION,0,3) < 4.1 ) { - global $_GET; - } - if (isset($_GET['MOD'])) { - $MOD = $_GET['MOD']; - } - else { + if (! sqgetGlobalVar('MOD', $MOD, SQ_GET) ) { $MOD = 'options_main'; } @@ -79,7 +75,8 @@ function sqspell_makePage($title, $scriptsrc, $body){ ) . "\n" . html_tag( 'tr', html_tag( 'td', 'SquirrelSpell ' . $SQSPELL_VERSION, 'center', $color[9] ) - ) . "\n"; + ) . "\n\n"; + echo ''; } /** @@ -342,9 +339,10 @@ function sqspell_getWords(){ * the user's old mailbox password. I admin, this is rather dirty, * but efficient. ;) */ - $key = $_COOKIE['key']; - $onetimepad = $_SESSION['onetimepad']; - $old_key = $_POST['old_key']; + sqgetGlobalVar('key', $key, SQ_COOKIE); + sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION); + + sqgetGlobalVar('old_key', $old_key, SQ_POST); if ($old_key != '') { $clear_key=$old_key; @@ -457,8 +455,8 @@ function sqspell_writeWords($words){ * User wants to encrypt the file. So be it. * Get the user's password to use as a key. */ - $key = $_COOKIE['key']; - $onetimepad = $_SESSION['onetimepad']; + sqgetGlobalVar('key', $key, SQ_COOKIE); + sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION); $clear_key=OneTimePadDecrypt($key, $onetimepad); /**