Changeset 52c2aa3 in github
- Timestamp:
- Oct 11, 2011 4:36:50 AM (21 months ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.7, release-0.8
- Children:
- b35a0f1
- Parents:
- dc6c4f4
- File:
-
- 1 edited
-
program/include/rcube_imap_generic.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
program/include/rcube_imap_generic.php
r765fdeb r52c2aa3 2301 2301 $parts = (array) $parts; 2302 2302 $key = $this->nextTag(); 2303 $peeks = ''; 2304 $idx = 0; 2303 $peeks = array(); 2305 2304 $type = $mime ? 'MIME' : 'HEADER'; 2306 2305 2307 2306 // format request 2308 foreach ($parts as $part) {2307 foreach ($parts as $part) { 2309 2308 $peeks[] = "BODY.PEEK[$part.$type]"; 2310 2309 } … … 2320 2319 do { 2321 2320 $line = $this->readLine(1024); 2322 $line = $this->multLine($line); 2323 2324 if (preg_match('/BODY\[([0-9\.]+)\.'.$type.'\]/', $line, $matches)) { 2325 $idx = $matches[1]; 2326 $result[$idx] = preg_replace('/^(\* [0-9]+ FETCH \()?\s*BODY\['.$idx.'\.'.$type.'\]\s+/', '', $line); 2327 $result[$idx] = trim($result[$idx], '"'); 2328 $result[$idx] = rtrim($result[$idx], "\t\r\n\0\x0B"); 2321 2322 if (preg_match('/^\* [0-9]+ FETCH [0-9UID( ]+BODY\[([0-9\.]+)\.'.$type.'\]/', $line, $matches)) { 2323 $idx = $matches[1]; 2324 $headers = ''; 2325 2326 // get complete entry 2327 if (preg_match('/\{([0-9]+)\}\r\n$/', $line, $m)) { 2328 $bytes = $m[1]; 2329 $out = ''; 2330 2331 while (strlen($out) < $bytes) { 2332 $out = $this->readBytes($bytes); 2333 if ($out === null) 2334 break; 2335 $headers .= $out; 2336 } 2337 } 2338 2339 $result[$idx] = trim($headers); 2329 2340 } 2330 2341 } while (!$this->startsWith($line, $key, true));
Note: See TracChangeset
for help on using the changeset viewer.
