Changeset 1321 in subversion


Ignore:
Timestamp:
Apr 17, 2008 3:01:03 AM (5 years ago)
Author:
alec
Message:
  • Fix IMAP response in message body when message has no body (#1484964)
Location:
trunk/roundcubemail
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/CHANGELOG

    r1320 r1321  
    22--------------------------- 
    33 
    4 2008/04/12 (estadtherr) 
     42008/04/17 (alec) 
     5---------- 
     6- Fix IMAP response in message body when message has no body (#1484964) 
     7 
     82008/04/16 (estadtherr) 
    59---------- 
    610- Fix mail sending with new TinyMCE 
  • trunk/roundcubemail/program/lib/imap.inc

    r1306 r1321  
    23332333        if ($line[$len-1] == ')') { 
    23342334            //one line response, get everything between first and last quotes 
    2335             $from = strpos($line, '"') + 1; 
    2336             $to   = strrpos($line, '"'); 
    2337             $len  = $to - $from; 
    2338             if ($mode == 1) { 
    2339                 $result = substr($line, $from, $len); 
    2340             } else if ($mode == 2) { 
    2341                 echo substr($line, $from, $len); 
     2335            if (substr($line, -4, 3) == 'NIL') { 
     2336                // NIL response 
     2337                $result = ''; 
     2338            } else { 
     2339                $from = strpos($line, '"') + 1; 
     2340                $to   = strrpos($line, '"'); 
     2341                $len  = $to - $from; 
     2342                $result = substr($line, $from, $len); 
     2343            } 
     2344             
     2345            if ($mode == 2) { 
     2346                echo $result; 
    23422347            } else if ($mode == 3) { 
    2343                 echo base64_decode(substr($line, $from, $len)); 
     2348                echo base64_decode($result); 
    23442349            } 
    2345         }else if ($line[$len-1] == '}') { 
     2350        } else if ($line[$len-1] == '}') { 
    23462351            //multi-line request, find sizes of content and receive that many bytes 
    23472352            $from     = strpos($line, '{') + 1; 
Note: See TracChangeset for help on using the changeset viewer.