* This contains functions for manipulating user preferences in files
*
* $Id$
+ * @package squirrelmail
*/
-/* include this for error messages */
+/** include this for error messages */
include_once(SM_PATH . 'functions/display_messages.php');
/**
exit;
}
@unlink($filename . '.tmp');
- chmod($filename, 0600);
+ @chmod($filename, 0600);
+ sqsession_register($prefs_cache , 'prefs_cache');
}
/**
/* Then, check if the file exists. */
if (!@file_exists($filename) ) {
/* First, check the $data_dir for the default preference file. */
- $default_pref = $data_dir . '/default_pref';
+ if(substr($data_dir,-1) != '/') {
+ $data_dir .= '/';
+ }
+ $default_pref = $data_dir . 'default_pref';
/* If it is not there, check the internal data directory. */
if (!@file_exists($default_pref)) {
exit;
}
@unlink($filename . '.tmp');
- chmod($filename, 0600);
+ @chmod($filename, 0600);
}