Added Turkish translation.
[squirrelmail.git] / src / load_prefs.php
index e23c9a5e2242ba34409f45c6edf6a33e8f6f06ad..56404aaa8aac1ed51b9ba475f6497c2c3a932484 100644 (file)
    define('load_prefs_php', true);
 
    global $theme, $chosen_theme, $color;
-   $theme = array();
-   $color = array();
-   include('../src/validate.php');
-   include("../config/config.php");
+   if (! isset($theme))
+      $theme = array();
+   if (! isset($color))
+      $color = array();
    include("../functions/prefs.php");
    include("../functions/plugin.php");
       
@@ -42,7 +42,7 @@
    if (isset($chosen_theme) && $in_ary && (file_exists($chosen_theme))) {
       @include($chosen_theme);
    } else {
-      if (file_exists($theme[0]["PATH"])) {
+      if (isset($theme) && isset($theme[0]) && file_exists($theme[0]["PATH"])) {
          @include($theme[0]["PATH"]);
       } else {
           #
       $index_order[5] = 4;
    }
    
+   global $alt_index_colors;
+   $alt_index_colors = getPref($data_dir, $username, 'alt_index_colors');
+   if ($alt_index_colors === 0) {
+      $alt_index_colors = false;
+   } else {
+      $alt_index_colors = true;
+   }
+   
    
    global $location_of_bar, $location_of_buttons;
    $location_of_bar = getPref($data_dir, $username, 'location_of_bar');