Changeset 5598 in subversion


Ignore:
Timestamp:
Dec 13, 2011 6:53:03 AM (18 months ago)
Author:
alec
Message:
  • Improve convert_criteria() so string literals will be not used if possible, to workaround issues with some buggy IMAP servers
File:
1 edited

Legend:

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

    r5576 r5598  
    14011401     * @param  string  $sort_field Header field to sort by 
    14021402     * @access public 
     1403     * @todo: Search criteria should be provided in non-IMAP format, eg. array 
    14031404     */ 
    14041405    function search($mailbox='', $str='ALL', $charset=NULL, $sort_field=NULL) 
     
    15211522                $string = substr($str, $string_offset - 1, $m[0]); 
    15221523                $string = rcube_charset_convert($string, $charset, $dest_charset); 
    1523                 if (!$string) 
     1524                if ($string === false) 
    15241525                    continue; 
    1525                 $res .= sprintf("%s{%d}\r\n%s", substr($str, $last, $m[1] - $last - 1), strlen($string), $string); 
     1526                $res .= substr($str, $last, $m[1] - $last - 1) . rcube_imap_generic::escape($string); 
    15261527                $last = $m[0] + $string_offset - 1; 
    15271528            } 
Note: See TracChangeset for help on using the changeset viewer.