cleanup some plugins to make use of sqgetGlobalVar
[squirrelmail.git] / plugins / squirrelspell / sqspell_config.php
index a34a856f4eaaffb6d787893aa023cae7ecc5b57a..f2a59ca88104c43e8089e6c956da7814b65e2c57 100644 (file)
@@ -1,24 +1,34 @@
 <?php
+/**
+ * sqspell_config.php -- SquirrelSpell Configuration file.
+ *
+ * Copyright (c) 1999-2003 The SquirrelMail Project Team
+ * Licensed under the GNU GPL. For full terms see the file COPYING.
+ *
+ *
+ *
+ * $Id$
+ */
 
-   /**
-    **  sqspell_config.php -- SquirrelSpell Configuration file.
-    **
-    **  Copyright (c) 1999-2001 The SquirrelMail development team
-    **  Licensed under the GNU GPL. For full terms see the file COPYING.
-    **
-    **
-    **
-    **  $Id$
-    **/
+require_once(SM_PATH . 'functions/prefs.php');
 
-    /* Just for poor wretched souls with E_ALL. :) */
-    global $username, $data_dir;
+/* Just for poor wretched souls with E_ALL. :) */
+global $data_dir;
 
+sqgetGlobalVar('username', $username, SQ_SESSION);
 
-    $SQSPELL_APP = array( 'English' => 'ispell -a' );
-    $SQSPELL_APP_DEFAULT = 'English';
-    $SQSPELL_WORDS_FILE = "$data_dir/$username.words";
-    $SQSPELL_EREG = 'ereg';
-    $SQSPELL_SOUP_NAZI = 'Mozilla/3, Mozilla/2, Opera 4, Opera/4, Macintosh';
+/**
+ * Example:
+ *
+ * $SQSPELL_APP = array( 'English' => 'ispell -a',
+ *                     'Spanish' => 'ispell -d spanish -a' );
+ */
+$SQSPELL_APP = array('English' => 'ispell -a',
+                       'Spanish' => 'ispell -d spanish -a');
+$SQSPELL_APP_DEFAULT = 'English';
+$SQSPELL_WORDS_FILE = 
+   getHashedFile($username, $data_dir, "$username.words");
 
-?>
\ No newline at end of file
+$SQSPELL_EREG = 'ereg';
+
+?>