Move away the sqimap_get_flags_list call because now
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 1 May 2002 11:01:59 +0000 (11:01 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 1 May 2002 11:01:59 +0000 (11:01 +0000)
sqimap_get_small_header_list provides the flags.

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

functions/imap_search.php

index 2c4ebbaf8720eee8ca7cb86755e6bd22fc178305..bffad029b37d42bbd0d2829563ba8acecb24def3 100644 (file)
@@ -98,7 +98,8 @@ function sqimap_search($imapConnection, $search_where, $search_what, $mailbox,
     }
     $issent = ($mailbox == $sent_folder);
     $hdr_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);
+
     foreach ($hdr_list as $hdr) {
         $from[] = $hdr->from;
         $date[] = $hdr->date;
@@ -108,6 +109,10 @@ function sqimap_search($imapConnection, $search_where, $search_what, $mailbox,
         $cc[] = $hdr->cc;
         $size[] = $hdr->size;
         $type[] = $hdr->type0;
+       $flag_deleted[] = $hdr->flag_deleted;
+       $flag_answered[] = $hdr->flag_answered;
+       $flag_seen[] = $hdr->flag_seen;
+       $flag_flagged[] = $hdr->flag_flagged;
     }
 
     $j = 0;
@@ -127,7 +132,11 @@ function sqimap_search($imapConnection, $search_where, $search_what, $mailbox,
             $messages[$j]["CC"] = $cc[$j];
             $messages[$j]["SIZE"] = $size[$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];
+/*
             $num = 0;
             while ($num < count($flags[$j])) {
                 if ($flags[$j][$num] == 'Deleted') {
@@ -141,7 +150,9 @@ function sqimap_search($imapConnection, $search_where, $search_what, $mailbox,
                 }
                 $num++;
             }
+*/         
             $j++;
+
     }
 
     /* Find and remove the ones that are deleted */