Changeset 5363 in subversion


Ignore:
Timestamp:
Oct 24, 2011 2:08:53 PM (19 months ago)
Author:
alec
Message:
  • Improve handling of situation when FETCH returns OK, but no data
Location:
trunk/roundcubemail/program/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/include/rcube_imap.php

    r5362 r5363  
    19631963        $headers = $this->get_headers($uid, $mailbox); 
    19641964 
     1965        // message doesn't exist? 
     1966        if (empty($headers)) 
     1967            return null;  
     1968 
    19651969        // structure might be cached 
    19661970        if (!empty($headers->structure)) 
     
    23832387        } 
    23842388 
    2385         // TODO: Add caching for message parts 
    2386  
    2387         if (!$part) { 
    2388             $part = 'TEXT'; 
    2389         } 
    2390  
    2391         $body = $this->conn->handlePartBody($this->mailbox, $uid, true, $part, 
    2392             $o_part->encoding, $print, $fp); 
     2389        if ($o_part && $o_part->size) { 
     2390            $body = $this->conn->handlePartBody($this->mailbox, $uid, true, 
     2391                $part ? $part : 'TEXT', $o_part->encoding, $print, $fp); 
     2392        } 
    23932393 
    23942394        if ($fp || $print) { 
  • trunk/roundcubemail/program/include/rcube_imap_generic.php

    r5330 r5363  
    23942394        $result = false; 
    23952395 
     2396        if ($a[2] != 'FETCH') { 
     2397        } 
    23962398        // handle empty "* X FETCH ()" response 
    2397         if ($line[$len-1] == ')' && $line[$len-2] != '(') { 
     2399        else if ($line[$len-1] == ')' && $line[$len-2] != '(') { 
    23982400            // one line response, get everything between first and last quotes 
    23992401            if (substr($line, -4, 3) == 'NIL') { 
Note: See TracChangeset for help on using the changeset viewer.