PHP 4.3.x prefs fix for db based prefs.
authorjangliss <jangliss@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 26 Mar 2003 16:04:20 +0000 (16:04 +0000)
committerjangliss <jangliss@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 26 Mar 2003 16:04:20 +0000 (16:04 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4682 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/db_prefs.php

index bb7cb71261018086e464e045fb75dfef3545481b..960a8bbe2776ea81345ed3bd83fb8c79d8d11449 100644 (file)
@@ -290,6 +290,12 @@ function removePref($data_dir, $username, $string) {
     }
 
     $db->deleteKey($username, $string);
+
+    if (isset($prefs_cache[$string])) {
+        unset($prefs_cache[$string]);
+    }
+
+    sqsession_register($prefs_cache , 'prefs_cache');
     return;
 }
 
@@ -316,7 +322,7 @@ function setPref($data_dir, $username, $string, $set_to) {
     assert_options(ASSERT_ACTIVE, 1);
     assert_options(ASSERT_BAIL, 1);
     assert ('$set_to == $prefs_cache[$string]');
-
+    sqsession_register($prefs_cache , 'prefs_cache');
     return;
 }