Optional replacement for prefs.php to store user preferences and
[squirrelmail.git] / src / folders.php
index 69898a58988eb9ca0d9ac8696f9204ab822c4be6..846220a32e0d42595c2d91b3b75a1ea7cf8b4b08 100644 (file)
@@ -29,7 +29,7 @@
 
    include("../src/load_prefs.php");
 
-   displayPageHeader($color, "None");
+   displayPageHeader($color, _("None"));
 
    echo "<br>";
    echo "<TABLE WIDTH=95% COLS=1 ALIGN=CENTER>\n";
              strtolower($boxes[$i]["unformatted"]) != "inbox.trash"))
            {
               $box = $boxes[$i]["unformatted-dm"];
-              $box2 = replace_spaces($boxes[$i]["unformatted-disp"]);
+              $box2 = str_replace(' ', '&nbsp;', $boxes[$i]["unformatted-disp"]);
               echo "         <OPTION VALUE=\"$box\">$box2\n";
            }
       }
    echo "<TT><SELECT NAME=subfolder>\n";
    if (strtolower($imap_server_type) != "courier"){
      if ($default_sub_of_inbox == false)
-       echo "<OPTION SELECTED>[ None ]\n";
+       echo '<OPTION SELECTED>[ '._("None")." ]\n";
      else
-       echo "<OPTION>[ None ]\n";
+       echo '<OPTION>[ '._("None")." ]\n";
    }
 
    for ($i = 0; $i < count($boxes); $i++) {
-      if (count($boxes[$i]["flags"]) > 0) {
-         $noinf = false;
-         for ($j = 0; $j < count($boxes[$i]["flags"]); $j++) {
-            if ($boxes[$i]["flags"][$j] == "noinferiors") {
-               $noinf = true;
-               continue;
-            }
-         }    
-         if ($noinf == false) {
-            if ((strtolower($boxes[$i]["unformatted"]) == "inbox") && ($default_sub_of_inbox == true)) {
-               $box = $boxes[$i]["unformatted"];
-               $box2 = replace_spaces($boxes[$i]["unformatted-disp"]);
-               echo "<OPTION SELECTED VALUE=\"$box\">$box2\n";
-            } else {
-               $box = $boxes[$i]["unformatted"];
-               $box2 = replace_spaces($boxes[$i]["unformatted-disp"]);
-               if (strtolower($imap_server_type) != "courier" ||
-                  strtolower($box) != "inbox.trash")
-                echo "<OPTION VALUE=\"$box\">$box2\n";
-            }
-         }
-      } else {
+      if (!in_array('noinferiors', $boxes[$i]['flags'])) {
          if ((strtolower($boxes[$i]["unformatted"]) == "inbox") && ($default_sub_of_inbox == true)) {
             $box = $boxes[$i]["unformatted"];
-            $box2 = replace_spaces($boxes[$i]["unformatted-disp"]);
+            $box2 = str_replace(' ', '&nbsp;', $boxes[$i]["unformatted-disp"]);
             echo "<OPTION SELECTED VALUE=\"$box\">$box2\n";
          } else {
             $box = $boxes[$i]["unformatted"];
-            $box2 = replace_spaces($boxes[$i]["unformatted-disp"]);
+            $box2 = str_replace(' ', '&nbsp;', $boxes[$i]["unformatted-disp"]);
            if (strtolower($imap_server_type) != "courier" ||
                strtolower($box) != "inbox.trash")
              echo "<OPTION VALUE=\"$box\">$box2\n";
             ($boxes[$i]["unformatted"] != $sent_folder)) 
            {   
               $box = $boxes[$i]["unformatted-dm"];
-              $box2 = replace_spaces($boxes[$i]["unformatted-disp"]);
+              $box2 = str_replace(' ', '&nbsp;', $boxes[$i]["unformatted-disp"]);
               if (strtolower($imap_server_type) != "courier" || strtolower($box) != "inbox.trash")
                  echo "<OPTION VALUE=\"$box\">$box2\n";
            }
             ($boxes[$i]["unformatted"] != $sent_folder)) 
            {   
               $box = $boxes[$i]["unformatted-dm"];
-              $box2 = replace_spaces($boxes[$i]["unformatted-disp"]);
+              $box2 = str_replace(' ', '&nbsp;', $boxes[$i]["unformatted-disp"]);
               echo "         <OPTION VALUE=\"$box\">$box2\n";
            }
       }