/*
* db_prefs.php
*
- * Copyright (c) 1999-2002 The SquirrelMail Project Team
+ * Copyright (c) 1999-2003 The SquirrelMail Project Team
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
* This contains functions for manipulating user preferences
/* Remove the pref $string */
function removePref($data_dir, $username, $string) {
+ global $prefs_cache;
$db = new dbPrefs;
if(isset($db->error)) {
$db->failQuery();
}
$db->deleteKey($username, $string);
+
+ if (isset($prefs_cache[$string])) {
+ unset($prefs_cache[$string]);
+ }
+
+ sqsession_register($prefs_cache , 'prefs_cache');
return;
}
return;
}
- if ($set_to == '') {
+ if ($set_to === '') {
removePref($data_dir, $username, $string);
return;
}
assert_options(ASSERT_ACTIVE, 1);
assert_options(ASSERT_BAIL, 1);
assert ('$set_to == $prefs_cache[$string]');
-
+ sqsession_register($prefs_cache , 'prefs_cache');
return;
}