ソースを参照

fixed double folder problem

Luke Ehresman 25 年 前
コミット
7fb6b302e1
2 ファイル変更8 行追加0 行削除
  1. 1 0
      ChangeLog
  2. 7 0
      functions/imap_mailbox.php

+ 1 - 0
ChangeLog

@@ -1,5 +1,6 @@
 Version 0.5pre2 -- DEVELOPMENT
 ------------------------------
+- Fixed double folder problem on some servers
 - Using encryption for passwords
 - Added a patch from Bill Thousand to allow easier virtual domains
 - Security updates with attachments

+ 7 - 0
functions/imap_mailbox.php

@@ -169,6 +169,13 @@
          if ($sorted_lsub_ary[$i] == "INBOX")
             $inbox_subscribed = true;
       }
+      $new_ary = array();
+      for ($i=0; $i < count($sorted_lsub_ary); $i++) {
+         if (!in_array($sorted_lsub_ary[$i], $new_ary)) {
+            $new_ary[] = $sorted_lsub_ary[$i];
+         }
+      }
+      $sorted_lsub_ary = $new_ary;
       if (isset($sorted_lsub_ary)) {
          sort($sorted_lsub_ary);
       }