X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=functions%2Fdb_prefs.php;h=7bc0800a6e956525d21fbc879c3a7e9c2e78e24c;hb=6a9acbca99e0444d2d958cc2ce16cd29565570b6;hp=519f066ff2c1660fdab31704e872c6ebad60e1a7;hpb=2deab9a3a3ae21dbeffb2ef0b12db1ae46adc560;p=squirrelmail.git diff --git a/functions/db_prefs.php b/functions/db_prefs.php index 519f066f..7bc0800a 100644 --- a/functions/db_prefs.php +++ b/functions/db_prefs.php @@ -21,7 +21,7 @@ * prefkey char / key * prefval blob * - * CREATE TABLE userprefs (user CHAR(32) NOT NULL DEFAULT '', + * CREATE TABLE userprefs (user CHAR(128) NOT NULL DEFAULT '', * prefkey CHAR(64) NOT NULL DEFAULT '', * prefval BLOB NOT NULL DEFAULT '', * primary key (user,prefkey)); @@ -119,7 +119,11 @@ class dbPrefs { if (isset($prefs_cache[$key])) { return $prefs_cache[$key]; } else { - return $default; + if (isset($this->default[$key])) { + return $this->default[$key]; + } else { + return $default; + } } } @@ -261,7 +265,7 @@ function removePref($data_dir, $username, $string) { function setPref($data_dir, $username, $string, $set_to) { global $prefs_cache; - if (isset($prefs_cache[$string]) && ($prefs_cache[$string] == $value)) { + if (isset($prefs_cache[$string]) && ($prefs_cache[$string] == $set_to)) { return; }