From dfc5b26c8d8ff1180a4396bbac95dcd27d4cdada Mon Sep 17 00:00:00 2001 From: pdontthink Date: Mon, 23 Jun 2008 19:54:09 +0000 Subject: [PATCH] Allow prefs plugins to fetch values such as FALSE, 0, '', '0', or other values that evaluate to boolean FALSE git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13192 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/file_prefs.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/functions/file_prefs.php b/functions/file_prefs.php index 524ee32c..823423cf 100644 --- a/functions/file_prefs.php +++ b/functions/file_prefs.php @@ -111,14 +111,15 @@ function getPref($data_dir, $username, $pref_name, $default = '') { $temp = array(&$username, &$pref_name); $result = do_hook('get_pref_override', $temp); - if (!$result) { + if (is_null($result)) { cachePrefValues($data_dir, $username); if (isset($prefs_cache[$pref_name])) { $result = $prefs_cache[$pref_name]; } else { +//FIXME: is there a justification for having two prefs hooks so close? who uses them? $temp = array(&$username, &$pref_name); $result = do_hook('get_pref', $temp); - if (!$result) { + if (is_null($result)) { $result = $default; } } -- 2.25.1