Added setting of language and a brief Norwegian translation.
[squirrelmail.git] / src / load_prefs.php
index e302658ea472e160e7ad3769e5967067b08c1286..8a827c63fed91de4bf8d5d03997b984622c126dd 100644 (file)
@@ -1,6 +1,8 @@
 <?
    include("../config/config.php");
-   include("../functions/prefs.php");
+
+   if (!isset($prefs_php))
+      include("../functions/prefs.php");
 
    checkForPrefs($data_dir, $username);
 
       if (file_exists($theme[0]["PATH"])) {
          require($theme[0]["PATH"]);
       } else {
-         echo "Theme: " . $theme[0]["PATH"] . " was not found.<BR>";
-         echo "Exiting abnormally";
+         echo _("Theme: ");
+         echo $theme[0]["PATH"];
+         echo _(" was not found.");
+         echo "<BR>";
+         echo _("Exiting abnormally");
          exit;
       }
    }
-?>
\ No newline at end of file
+
+
+   /** Load the user's trash folder preferences **/
+   $move_to_trash = getPref($data_dir, $username, "move_to_trash");
+   if ($move_to_trash == "")
+      $move_to_trash = $default_move_to_trash;
+
+   $wrap_at = getPref($data_dir, $username, "wrap_at");
+   if ($wrap_at == "")
+      $wrap_at = 86;
+
+   $editor_size = getPref($data_dir, $username, "editor_size");
+   if ($editor_size == "")
+      $editor_size = 76;
+
+   $use_signature = getPref($data_dir, $username, "use_signature");
+   if ($use_signature == "")
+      $use_signature = false;
+
+   $left_refresh = getPref($data_dir, $username, "left_refresh");
+   if ($left_refresh == "")
+      $left_refresh = false;
+   
+   /** Load up the Signature file **/
+   if ($use_signature == true) {
+      $signature = getSig($data_dir, $username);
+   } else {
+   }
+?>