소스 검색

* More fixes
* $boxes[$i]['flags'] is always an array now. :-)

Tyler Akins 24 년 전
부모
커밋
124a582ee4
3개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 0
      functions/imap_mailbox.php
  2. 1 2
      functions/mailbox_display.php
  3. 1 1
      src/left_main.php

+ 2 - 0
functions/imap_mailbox.php

@@ -163,6 +163,8 @@
          if ($flags) {
             $boxes[$g]['flags'] = explode(' ', $flags);
          }
+	 else
+	     $boxes[$g]['flags'] = array();
       }
 
       return $boxes;

+ 1 - 2
functions/mailbox_display.php

@@ -517,8 +517,7 @@
 
       $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";

+ 1 - 1
src/left_main.php

@@ -138,7 +138,7 @@
       $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")