Browse Source

* Further optimization

Tyler Akins 24 years ago
parent
commit
31e1b270df
1 changed files with 6 additions and 0 deletions
  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);
    }