** Loads preferences from the $username.pref file used by almost
** every other script in the source directory and alswhere.
**
+ ** $Id$
**/
if (!isset($config_php))
include("../functions/plugin.php");
$load_prefs_php = true;
+ if (!isset($username))
+ $username = '';
checkForPrefs($data_dir, $username);
$chosen_theme = getPref($data_dir, $username, "chosen_theme");
}
if ((isset($chosen_theme)) && (file_exists($chosen_theme))) {
- require("$chosen_theme");
+ $loaded=@include("$chosen_theme");
} else {
if (file_exists($theme[0]["PATH"])) {
require($theme[0]["PATH"]);
$color[11] = "#770000"; // (dark red) Special Folders color
}
}
-
- session_register("theme_css");
+ if (!isset($loaded)) echo "loading configured theme $chosen_theme failed";
+ if (!isset($download_php)) session_register("theme_css");
$use_javascript_addr_book = getPref($data_dir, $username, "use_javascript_addr_book");
if ($use_javascript_addr_book == "")
if ($use_signature == "")
$use_signature = false;
+ $prefix_sig = getPref($data_dir, $username, "prefix_sig");
+ if ($prefix_sig == "")
+ $prefix_sig = false;
+
$left_refresh = getPref($data_dir, $username, "left_refresh");
if ($left_refresh == "")
$left_refresh = false;
$index_order[$i] = $order;
$order = getPref($data_dir, $username, "order".($i+1));
}
- if (!$index_order) {
+ if (!isset($index_order)) {
$index_order[1] = 1;
$index_order[2] = 2;
$index_order[3] = 3;
$location_of_buttons = getPref($data_dir, $username, 'location_of_buttons');
if ($location_of_buttons == '')
$location_of_buttons = 'between';
+
+ $collapse_folders = getPref($data_dir, $username, 'collapse_folders');
do_hook("loading_prefs");