X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fsquirrelspell%2Fsqspell_interface.php;h=b0afdf6524916d3de460fe240a4276179295aa12;hp=9b17376621c0bca8c2038ec9ac6991bb63c0b35b;hb=91e0dccca7b2452d8b450791cae3aa4125e8889e;hpb=15e6162eacc97158393bc75aed3afeb7b19c24a6 diff --git a/plugins/squirrelspell/sqspell_interface.php b/plugins/squirrelspell/sqspell_interface.php index 9b173766..b0afdf65 100644 --- a/plugins/squirrelspell/sqspell_interface.php +++ b/plugins/squirrelspell/sqspell_interface.php @@ -1,48 +1,62 @@ +/** + * sqspell_interface.php + * + * Main wrapper for the pop-up. + * + * Copyright (c) 1999-2004 The SquirrelMail development team + * Licensed under the GNU GPL. For full terms see the file COPYING. + * + * This is a main wrapper for the pop-up window interface of + * SquirrelSpell. + * + * $Id$ + * + * @author Konstantin Riabitsev ($Author$) + * @version $Date$ + * @package plugins + * @subpackage squirrelspell + */ + +/** + * Set up a couple of non-negotiable constants and + * defaults. Don't change these, * the setuppable stuff is in + * sqspell_config.php + */ +$SQSPELL_DIR='plugins/squirrelspell/'; +$SQSPELL_CRYPTO=FALSE; + +/** + * Load the stuff needed from squirrelmail + * @ignore + */ +define('SM_PATH','../../'); + +/* SquirrelMail required files. */ +require_once(SM_PATH . 'include/validate.php'); +require_once(SM_PATH . 'include/load_prefs.php'); +require_once(SM_PATH . $SQSPELL_DIR . 'sqspell_config.php'); +require_once(SM_PATH . $SQSPELL_DIR . 'sqspell_functions.php'); + +/** + * $MOD is the name of the module to invoke. + * If $MOD is undefined, use "init", else check for security + * breaches. + */ +if(isset($_POST['MOD'])) { + $MOD = $_POST['MOD']; +} elseif (isset($_GET['MOD'])) { + $MOD = $_GET['MOD']; +} + +if (!isset($MOD) || !$MOD){ + $MOD='init'; +} else { + sqspell_ckMOD($MOD); +} + +/* Include the module. */ +require_once(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod"); + +?> \ No newline at end of file