Преглед на файлове

rewrote unfold routine inside sqimap_small_header_list because it didn't
handle the headerlines like it should (rfc2060). For example a subject line
with a subject size of 70 chars (no spaces) could not be detected.

stekkel преди 22 години
родител
ревизия
023e257faf
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. 2 1
      functions/imap_messages.php

+ 2 - 1
functions/imap_messages.php

@@ -517,7 +517,8 @@ function sqimap_get_small_header_list ($imap_stream, $msg_list) {
 
         foreach ($read as $read_part) {
             //unfold multi-line headers
-            if ($prevline && strpos($read_part, "\t ") === true) {
+            if ($prevline && $prevline{strlen($prevline)-1} == "\n" 
+                   && ($read_part{0} == ' ' || $read_part{0} == "\t")) {
                 $read_part = substr($prevline, 0, -2) . preg_replace('/(\t\s+)/',' ',$read_part);
             }
             $prevline = $read_part;