rg=0
[squirrelmail.git] / plugins / squirrelspell / sqspell_options.php
index 3470d1527bf0096f21220d2292c5ae5692f4b844..55c7fddc3d5fc05753ec62b477ca02cfc14a7bd0 100644 (file)
@@ -23,8 +23,7 @@ $SQSPELL_CRYPTO=FALSE;
 /**
  * Load some necessary stuff from squirrelmail. 
  */
-chdir('..');
-define('SM_PATH','../');
+define('SM_PATH','../../');
 
 /* SquirrelMail required files. */
 require_once(SM_PATH . 'include/validate.php');
@@ -39,7 +38,13 @@ require_once(SM_PATH . $SQSPELL_DIR . 'sqspell_functions.php');
  * If $MOD is unspecified, assign "init" to it. Else check for
  * security breach attempts.
  */
-if (!isset($MOD) || !$MOD){
+if(isset($_POST['MOD'])) {
+    $MOD = $_POST['MOD'];
+} elseif (isset($_GET['MOD'])) {
+    $MOD = $_GET['MOD'];
+}
+
+if(!isset($MOD) || !$MOD) {
   $MOD = 'options_main';
 } else {
   sqspell_ckMOD($MOD);