浏览代码

PHP 4.3.x prefs fix for db based prefs.

jangliss 22 年之前
父节点
当前提交
f0683457c6
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. 7 1
      functions/db_prefs.php

+ 7 - 1
functions/db_prefs.php

@@ -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;
 }