Added setting of language and a brief Norwegian translation.
[squirrelmail.git] / src / load_prefs.php
CommitLineData
d3cdb279 1<?
d0747e26 2 include("../config/config.php");
d30d79f2 3
4 if (!isset($prefs_php))
5 include("../functions/prefs.php");
d3cdb279 6
b4da6659 7 checkForPrefs($data_dir, $username);
8
d0747e26 9 $chosen_theme = getPref($data_dir, $username, "chosen_theme");
d3cdb279 10
f3d17401 11 if ((isset($chosen_theme)) && (file_exists($chosen_theme))) {
d3cdb279 12 require("$chosen_theme");
13 } else {
f3d17401 14 if (file_exists($theme[0]["PATH"])) {
15 require($theme[0]["PATH"]);
16 } else {
67c62ef9 17 echo _("Theme: ");
f94ff7ce 18 echo $theme[0]["PATH"];
19 echo _(" was not found.");
20 echo "<BR>";
67c62ef9 21 echo _("Exiting abnormally");
f3d17401 22 exit;
23 }
d3cdb279 24 }
11307a4c 25
26
27 /** Load the user's trash folder preferences **/
28 $move_to_trash = getPref($data_dir, $username, "move_to_trash");
29 if ($move_to_trash == "")
30 $move_to_trash = $default_move_to_trash;
31
32 $wrap_at = getPref($data_dir, $username, "wrap_at");
33 if ($wrap_at == "")
34 $wrap_at = 86;
35
36 $editor_size = getPref($data_dir, $username, "editor_size");
37 if ($editor_size == "")
38 $editor_size = 76;
f804972b 39
40 $use_signature = getPref($data_dir, $username, "use_signature");
41 if ($use_signature == "")
42 $use_signature = false;
43
469eb37b 44 $left_refresh = getPref($data_dir, $username, "left_refresh");
45 if ($left_refresh == "")
46 $left_refresh = false;
47
f804972b 48 /** Load up the Signature file **/
49 if ($use_signature == true) {
50 $signature = getSig($data_dir, $username);
51 } else {
f804972b 52 }
11307a4c 53?>