/**
* file_prefs.php
*
- * Copyright (c) 1999-2005 The SquirrelMail Project Team
- * Licensed under the GNU GPL. For full terms see the file COPYING.
- *
* This contains functions for manipulating user preferences in files
*
+ * @copyright © 1999-2007 The SquirrelMail Project Team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package squirrelmail
* @subpackage prefs
* @since 1.2.5
*/
-/** @ignore */
-if (! defined('SM_PATH')) define('SM_PATH','../');
-
-/** include this for error messages */
-include_once(SM_PATH . 'functions/display_messages.php');
/**
* Check the preferences into the session cache.
sqgetGlobalVar('prefs_are_cached', $prefs_are_cached, SQ_SESSION );
if ( isset($prefs_are_cached) && $prefs_are_cached) {
sqgetGlobalVar('prefs_cache', $prefs_cache, SQ_SESSION );
+// sm_print_r($prefs_cache);
+// exit;
return;
}
function getPref($data_dir, $username, $string, $default = '') {
global $prefs_cache;
- $result = do_hook_function('get_pref_override',array($username,$string));
+ $result = do_hook('get_pref_override', $temp=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));
+ $result = do_hook('get_pref', $temp=array(&$username, &$string));
if (!$result) {
$result = $default;
}
$uid = $user_data['name'];
}
$errTitle = _("Could not create initial preference file!");
- $errString = $errTitle . "<br />\n" .
- sprintf( _("%s should be writable by user %s"), $data_dir, $uid ) . "<br />\n" .
- _("Please contact your system administrator and report this error.") . "<br />\n";
+ $errString = $errTitle . "\n" .
+ sprintf( _("%s should be writable by user %s."), $data_dir, $uid ) . "\n" .
+ _("Please contact your system administrator and report this error.") ;
logout_error( $errString, $errTitle );
exit;
}
}
// vim: et ts=4
-?>
\ No newline at end of file