replaced "foo" with 'foo' while doing other
[squirrelmail.git] / src / load_prefs.php
index 2e7f80e48435d59b70e38be4f74ff92e8c78f7cd..31389dfc4f6f59187ac97506b99f83c545fd8e60 100644 (file)
@@ -8,6 +8,7 @@
     **  Loads preferences from the $username.pref file used by almost
     **  every other script in the source directory and alswhere.
     **
+    **  $Id$
     **/
 
    if (!isset($config_php))
@@ -18,6 +19,8 @@
       include("../functions/plugin.php");
       
    $load_prefs_php = true;
+   if (!isset($username))
+       $username = '';
    checkForPrefs($data_dir, $username);
 
    $chosen_theme = getPref($data_dir, $username, "chosen_theme");
@@ -59,7 +62,7 @@
       }
    }
 
-    if (!$download_php) session_register("theme_css");
+    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 == "")
       $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;