Better error messages: for some reason, the strings weren't used to report the error?
[squirrelmail.git] / plugins / squirrelspell / sqspell_interface.php
index 1357162e17979e7e0c49d1f28431e22fbfc270ce..797a06d2c374872bcfdd42a8e9268bdd3dd63a82 100644 (file)
@@ -28,9 +28,13 @@ $SQSPELL_CRYPTO=FALSE;
 /**
  * Load the stuff needed from squirrelmail
  */
+
 chdir('..');
-require_once('../src/validate.php');
-require_once('../src/load_prefs.php');
+define('SM_PATH','../');
+
+/* SquirrelMail required files. */
+require_once(SM_PATH . 'include/validate.php');
+require_once(SM_PATH . 'src/load_prefs.php');
 require_once("$SQSPELL_DIR/sqspell_config.php");
 require_once("$SQSPELL_DIR/sqspell_functions.php");
     
@@ -39,7 +43,7 @@ require_once("$SQSPELL_DIR/sqspell_functions.php");
  * If $MOD is undefined, use "init", else check for security
  * breaches.
  */
-if (!$MOD){
+if (!isset($MOD) || !$MOD){
   $MOD='init';
 } else {
   sqspell_ckMOD($MOD);