浏览代码

Move away the sqimap_get_flags_list call because now sqimap_get_small_header_list
provides the flags.

stekkel 23 年之前
父节点
当前提交
f783b40e64
共有 1 个文件被更改,包括 12 次插入2 次删除
  1. 12 2
      functions/mailbox_display.php

+ 12 - 2
functions/mailbox_display.php

@@ -325,7 +325,7 @@ function showMessagesForMailbox($imapConnection, $mailbox, $num_msgs,
 	$id = array_reverse(range($real_endMessage, $real_startMessage));
 	$id = array_reverse(range($real_endMessage, $real_startMessage));
       }
       }
       $msgs_list = sqimap_get_small_header_list($imapConnection, $id, $issent);
       $msgs_list = sqimap_get_small_header_list($imapConnection, $id, $issent);
-      $flags = sqimap_get_flags_list($imapConnection, $id, $issent);
+//      $flags = sqimap_get_flags_list($imapConnection, $id, $issent);
       if (sizeof($msgs_list)){
       if (sizeof($msgs_list)){
 	foreach ($msgs_list as $hdr) {
 	foreach ($msgs_list as $hdr) {
 	  $from[] = $hdr->from;
 	  $from[] = $hdr->from;
@@ -336,6 +336,10 @@ function showMessagesForMailbox($imapConnection, $mailbox, $num_msgs,
 	  $cc[] = $hdr->cc;
 	  $cc[] = $hdr->cc;
 	  $size[] = $hdr->size;
 	  $size[] = $hdr->size;
 	  $type[] = $hdr->type0;
 	  $type[] = $hdr->type0;
+	  $flag_deleted[] = $hdr->flag_deleted;
+	  $flag_answered[] = $hdr->flag_answered;
+	  $flag_seen[] = $hdr->flag_seen;
+	  $flag_flagged[] = $hdr->flag_flagged;
 	}
 	}
       }
       }
     }
     }
@@ -375,6 +379,11 @@ function showMessagesForMailbox($imapConnection, $mailbox, $num_msgs,
       $messages[$j]['CC'] = $cc[$j];
       $messages[$j]['CC'] = $cc[$j];
       $messages[$j]['SIZE'] = $size[$j];
       $messages[$j]['SIZE'] = $size[$j];
       $messages[$j]['TYPE0'] = $type[$j];
       $messages[$j]['TYPE0'] = $type[$j];
+      $messages[$j]['FLAG_DELETED'] = $flag_deleted[$j];
+      $messages[$j]['FLAG_ANSWERED'] = $flag_answered[$j];
+      $messages[$j]['FLAG_SEEN'] = $flag_seen[$j];
+      $messages[$j]['FLAG_FLAGGED'] = $flag_flagged[$j];
+
       
       
       /*
       /*
        * fix SUBJECT-SORT to remove Re:
        * fix SUBJECT-SORT to remove Re:
@@ -389,7 +398,7 @@ function showMessagesForMailbox($imapConnection, $mailbox, $num_msgs,
 		     $messages[$j]['SUBJECT-SORT'], $matches)){
 		     $messages[$j]['SUBJECT-SORT'], $matches)){
 	$messages[$j]['SUBJECT-SORT'] = $matches[2];
 	$messages[$j]['SUBJECT-SORT'] = $matches[2];
       }
       }
-      
+/*      
       $num = 0;
       $num = 0;
       while ($num < count($flags[$j])) {
       while ($num < count($flags[$j])) {
 	if ($flags[$j][$num] == 'Deleted') {
 	if ($flags[$j][$num] == 'Deleted') {
@@ -402,6 +411,7 @@ function showMessagesForMailbox($imapConnection, $mailbox, $num_msgs,
 	  $messages[$j]['FLAG_FLAGGED'] = true;
 	  $messages[$j]['FLAG_FLAGGED'] = true;
 	}
 	}
 	$num++;
 	$num++;
+*/
       }
       }
       $j++;
       $j++;
     }
     }