浏览代码

* Further optimization

Tyler Akins 24 年之前
父节点
当前提交
31e1b270df
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      functions/prefs.php

+ 6 - 0
functions/prefs.php

@@ -103,6 +103,12 @@
       global $prefs_cache;
       
       cachePrefValues($data_dir, $username);
+      if ($prefs_cache[$string] == $set_to)
+         return;
+      if ($set_to == '') {
+         removePref($data_dir, $username, $string);
+	 return;
+      }
       $prefs_cache[$string] = $set_to;
       savePrefValues($data_dir, $username);
    }