* More fixes
authorfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 6 Feb 2001 20:30:03 +0000 (20:30 +0000)
committerfidian <fidian@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 6 Feb 2001 20:30:03 +0000 (20:30 +0000)
* $boxes[$i]['flags'] is always an array now.  :-)

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1064 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/imap_mailbox.php
functions/mailbox_display.php
src/left_main.php

index d36c66232ee2aa5af7e3c72cbc8a2a7cd1c48667..dc701517ff60c7f4cb5ac9d1bb371201d5ee4a6b 100755 (executable)
          if ($flags) {
             $boxes[$g]['flags'] = explode(' ', $flags);
          }
+        else
+            $boxes[$g]['flags'] = array();
       }
 
       return $boxes;
index f52cd1229c79c18841e6485f1395a90e3ba0352b..e534c9360f5e43a80748ebacc4fdb320fb9911ce 100644 (file)
 
       $boxes = sqimap_mailbox_list($imapConnection);
       for ($i = 0; $i < count($boxes); $i++) {
-         if (!is_array($boxes[$i]['flags']) ||
-            !in_array("noselect", $boxes[$i]['flags'])) {
+         if (!in_array("noselect", $boxes[$i]['flags'])) {
             $box = $boxes[$i]['unformatted'];
             $box2 = replace_spaces($boxes[$i]['unformatted-disp']);
             echo "         <OPTION VALUE=\"$box\">$box2</option>\n";
index 0077c07d8f478610fd1b47850c1e70cc0eddf17a..2966c74ad2e89d95252827879990088bbaeaa132 100644 (file)
       $line = "";
       $mailbox = $boxes[$i]["formatted"];
       
-      if (isset($boxes[$i]["flags"])) {
+      if (count($boxes[$i]["flags"])) {
          $noselect = false;
          for ($h = 0; $h < count($boxes[$i]["flags"]); $h++) {
             if (strtolower($boxes[$i]["flags"][$h]) == "noselect")