Converted sm-1_0 to branch and sm-1_1 to trunk
[squirrelmail.git] / src / left_main.php
index 2966c74ad2e89d95252827879990088bbaeaa132..d80fdd781590391ca48b72dd392d791c4aa2c709 100644 (file)
       $line = "";
       $mailbox = $boxes[$i]["formatted"];
       
-      if (count($boxes[$i]["flags"])) {
-         $noselect = false;
-         for ($h = 0; $h < count($boxes[$i]["flags"]); $h++) {
-            if (strtolower($boxes[$i]["flags"][$h]) == "noselect")
-               $noselect = true;
-         }
-         if ($noselect == true) {
-            $line .= "<FONT COLOR=\"$color[10]\">";
-            $line .= replace_spaces($mailbox);
-            $line .= "</FONT>";
-         } else {
-           if (! isset($boxes[$i]["unseen"])) 
-               $boxes[$i]["unseen"] = 0;
-            $line .= formatMailboxName($imapConnection, $mailbox, $boxes[$i]["unformatted"], $delimeter, $boxes[$i]["unseen"]);
-         }
+      if (in_array('noselect', $boxes[$i]['flags'])) {
+         $line .= "<FONT COLOR=\"$color[10]\">";
+         $line .= replace_spaces($mailbox);
+         $line .= '</FONT>';
       } else {
-        if (!isset($boxes[$i]["unseen"])) 
-            $boxes[$i]["unseen"] = "";
+        if (! isset($boxes[$i]['unseen'])) 
+           $boxes[$i]['unseen'] = '';
          $line .= formatMailboxName($imapConnection, $mailbox, $boxes[$i]["unformatted"], $delimeter, $boxes[$i]["unseen"]);
       }
       echo "$line<BR>\n";