Procházet zdrojové kódy

fixed bug #128278 - size not displayed correctly when searching

Luke Ehresman před 24 roky
rodič
revize
a5b4ea4619
2 změnil soubory, kde provedl 9 přidání a 6 odebrání
  1. 1 1
      functions/imap_general.php
  2. 8 5
      functions/imap_search.php

+ 1 - 1
functions/imap_general.php

@@ -18,7 +18,7 @@
 
       $counter = 0;
       do {
-          $data[$counter] = $read = fgets ($imap_stream, 4096);
+          $data[$counter] = $read = fgets ($imap_stream, 9096);
           if ($imap_general_debug) { echo "<small><tt><font color=cc0000>$read</font></tt></small><br>"; flush(); }
           $counter++;
       } while (! ereg("^$pre (OK|BAD|NO)(.*)$", $read, $regs));

+ 8 - 5
functions/imap_search.php

@@ -63,14 +63,15 @@ function sqimap_search($imapConnection,$search_where,$search_what,$mailbox,$colo
       else
          $hdr = sqimap_get_small_header ($imapConnection, $messagelist[$q], false);
 						
-			$from[$q] = $hdr->from;
-			$date[$q] = $hdr->date;
-			$subject[$q] = $hdr->subject;
+         $from[$q] = $hdr->from;
+         $date[$q] = $hdr->date;
+         $subject[$q] = $hdr->subject;
          $to[$q] = $hdr->to;
          $priority[$q] = $hdr->priority;
          $cc[$q] = $hdr->cc;
+		 $size[$q] = $hdr->size;
+		 $type[$q] = $hdr->type0;
          $id[$q] = $messagelist[$q];
-
          $flags[$q] = sqimap_get_flags ($imapConnection, $messagelist[$q]);
       }
 
@@ -87,8 +88,10 @@ function sqimap_search($imapConnection,$search_where,$search_what,$mailbox,$colo
          $messages[$j]["SUBJECT"] = decodeHeader($subject[$j]);
          $messages[$j]["SUBJECT-SORT"] = strtolower(decodeHeader($subject[$j]));
          $messages[$j]["TO"] = decodeHeader($to[$j]);
-			$messages[$j]["PRIORITY"] = $priority[$j];
+         $messages[$j]["PRIORITY"] = $priority[$j];
          $messages[$j]["CC"] = $cc[$j];
+		 $messages[$j]["SIZE"] = $size[$j];
+		 $messages[$j]["TYPE0"] = $type[$j];
 
          $num = 0;
          while ($num < count($flags[$j])) {