Using IEC standard prefixes.
[squirrelmail.git] / include / load_prefs.php
index d25426ea7897e350107758be15990a839005b965..012c8e3c49d9e3264e6cace5788b85a276ea43f2 100644 (file)
  * @package squirrelmail
  */
 
-
 /**
  * do not allow to call this file directly
+ * FIXME: PHP CGI (at least on IIS 5.1) does not set 'SCRIPT_FILENAME' and
+ * code does not handle magic_quotes_gpc=on.
  */
-if ((isset($_SERVER) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) ||
-     (isset($HTTP_SERVER_SERVER) && $HTTP_SERVER_SERVER['SCRIPT_FILENAME'] == __FILE__) ) {
+if ((isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE__) ||
+     (isset($HTTP_SERVER_SERVER['SCRIPT_FILENAME']) && $HTTP_SERVER_SERVER['SCRIPT_FILENAME'] == __FILE__) ) {
     header("Location: ../src/login.php");
     die();
 }
@@ -68,8 +69,8 @@ for ($i = 0; $i < count($theme); ++$i){
         break;
     }
 }
-$chosen_theme = (!$found_theme ? '' : $chosen_theme);
 
+$chosen_theme = (!$found_theme ? '' : $chosen_theme);
 
 /**
 * This theme as a failsafe if no themes were found. It makes
@@ -101,11 +102,6 @@ if (isset($chosen_theme) && $found_theme && (file_exists($chosen_theme))) {
     }
 }
 
-
-if (!defined('download_php')) {
-    sqsession_register($theme_css, 'theme_css');
-}
-
 // user's icon theme, if using icons
 $icon_theme = getPref($data_dir, $username, 'icon_theme', 'images/themes/xp/' );
 if ($icon_theme == 'template') {
@@ -402,7 +398,16 @@ $chosen_fontset = getPref($data_dir, $username, 'chosen_fontset', $default_fonts
 if (! isset($default_fontsize)) $default_fontsize=SMPREF_NONE;
 $chosen_fontsize = getPref($data_dir, $username, 'chosen_fontsize', $default_fontsize);
 
-
+/**
+ * Controls translation of special folders
+ * @since 1.5.2
+ */
+$translate_special_folders = getPref($data_dir, $username, 'translate_special_folders', SMPREF_OFF);
+/**
+ * Controls display of message copy options
+ * @since 1.5.2
+ */
+$show_copy_buttons = getPref($data_dir, $username, 'show_copy_buttons', SMPREF_OFF);
 
 /** Put in a safety net for authentication here, in case a naughty admin didn't run conf.pl when they upgraded */