projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Various fixes
[squirrelmail.git]
/
functions
/
prefs.php
diff --git
a/functions/prefs.php
b/functions/prefs.php
index d2d75560871aa5b5e2c09f7f93c72ee940748929..e719adf622b731d3ded1eb7b321632439b775979 100644
(file)
--- a/
functions/prefs.php
+++ b/
functions/prefs.php
@@
-62,14
+62,15
@@
/** returns the value for $string **/
/** returns the value for $string **/
- function getPref($data_dir, $username, $string) {
+ function getPref($data_dir, $username, $string
, $default = ''
) {
global $prefs_cache;
global $prefs_cache;
-
+
cachePrefValues($data_dir, $username);
cachePrefValues($data_dir, $username);
-
+
if (isset($prefs_cache[$string]))
return $prefs_cache[$string];
if (isset($prefs_cache[$string]))
return $prefs_cache[$string];
- return '';
+ else
+ return $default;
}
}
@@
-103,9
+104,9
@@
global $prefs_cache;
cachePrefValues($data_dir, $username);
global $prefs_cache;
cachePrefValues($data_dir, $username);
- if ($prefs_cache[$string] == $set_to)
+ if (
isset($prefs_cache[$string]) &&
$prefs_cache[$string] == $set_to)
return;
return;
- if ($set_to == '') {
+ if ($set_to ==
=
'') {
removePref($data_dir, $username, $string);
return;
}
removePref($data_dir, $username, $string);
return;
}
@@
-149,4
+150,4
@@
}
return $sig;
}
}
return $sig;
}
-?>
+?>
\ No newline at end of file