Some fixup.
authorphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 30 Nov 2001 18:39:15 +0000 (18:39 +0000)
committerphilippe_mingo <philippe_mingo@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 30 Nov 2001 18:39:15 +0000 (18:39 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1818 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/constants.php
functions/prefs.php
src/redirect.php

index e223c464f76940fdbbf4ebbaf8a6595ee6c0a3a3..a53c3cb5d8e74cab04b1f2f09f2da517c9560e63 100644 (file)
@@ -17,6 +17,8 @@
     /* Set values for constants used by Squirrelmail preferences. */
     /**************************************************************/
 
+    require_once( '../functions/plugin.php' );      // Required for the hook
+
     /* Define basic, general purpose preference constants. */
     define('SMPREF_NO', 0);
     define('SMPREF_OFF', 0);
index 1d5fb68fb67cec349c5010213daf20b11082957e..8b0692429b2355e2341c0a6f82461fa9aafa8430 100644 (file)
 
    function removePref($data_dir, $username, $string) {
       global $prefs_cache;
-      
+
       cachePrefValues($data_dir, $username);
-      
+
       if (isset($prefs_cache[$string])) {
           unset($prefs_cache[$string]);
       }
-          
+
       savePrefValues($data_dir, $username);
    }
-   
+
    /** sets the pref, $string, to $set_to **/
    function setPref($data_dir, $username, $string, $set_to) {
       global $prefs_cache;
-      
+
       cachePrefValues($data_dir, $username);
       if (isset($prefs_cache[$string]) && $prefs_cache[$string] == $set_to)
          return;
       if ($set_to === '') {
          removePref($data_dir, $username, $string);
-        return;
+         return;
       }
       $prefs_cache[$string] = $set_to;
       savePrefValues($data_dir, $username);
        create it. **/
    function checkForPrefs($data_dir, $username) {
       $filename = $data_dir . $username . '.pref';
-      if (!file_exists($filename)) {
+      if (!file_exists($filename) ) {
          if (!copy($data_dir . 'default_pref', $filename)) {
             echo _("Error opening ") . $filename;
             exit;
       }
       return $sig;
    }
-?>
+
+?>
\ No newline at end of file
index 011b14b2882e261dfd3b63e8ff2574e368f9ede8..0e62b671c63dedd8bd72a015993a07caa61a8963 100644 (file)
         session_register ('username');
         setcookie('key', $key, 0, $base_uri);
         do_hook ('login_verified');
+
         setPref( $data_dir, $username, 'counter',
             getPref( $data_dir, $username, 'counter', 0 ) + 1 );
     }