- $result = do_hook_function('get_pref_override',array($username,$string));
- if (!$result) {
- cachePrefValues($data_dir, $username);
- if (isset($prefs_cache[$string])) {
- $result = $prefs_cache[$string];
- } else {
- $result = do_hook_function('get_pref', array($username,$string));
- if (!$result) {
- $result = $default;
- }
- }
+ $temp = array(&$username, &$pref_name);
+ $result = do_hook('get_pref_override', $temp);
+ 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 (is_null($result)) {
+ $result = $default;
+ }
+ }