Search bug

Thomas Bruederli roundcube at gmail.com
Mon May 15 22:57:40 CEST 2006


Thanks for reporting! I just applied your changes to the CVS.

Regards,
Thomas


Jon Daley wrote:
> Fixed.  Though I don't speak IMAP very well, and only just starting in roundcube, it does work for me.
> 
> http://www.faqs.org/rfcs/rfc3501.html says CHARSET comes before the FROM.
> 
> ~webmail/program/include>svn diff                                                                                          
> Index: rcube_imap.inc
> ===================================================================
> --- rcube_imap.inc      (revision 1641)
> +++ rcube_imap.inc      (working copy)
> @@ -856,7 +856,7 @@
>      $mailbox = $mbox ? $this->_mod_mailbox($mbox) : $this->mailbox;
>      if ($str && $criteria)
>        {
> -      $criteria .= ' CHARSET UTF-8 "'.UTF7EncodeString($str).'"';
> +      $criteria = 'CHARSET UTF-8 '.$criteria.' "'.UTF7EncodeString($str).'"';
>        return $this->_search_index($mailbox, $criteria);
>        }
>      else
> 
> 
> On Mon, 15 May 2006 14:05:01 -0500, Charles McNulty <charles at charlesmcnulty.com> wrote:
>> I noticed this too and traced it back to iil_C_Search in imap.inc (if
>> you output $this->conn->error you get:
>>
>> iil_C_Search: srch1 BAD Bogus criteria list in SEARCH
>>
>> I'd look at it further but I'm too busy debugging the deletion of
>> e-mails from the message-view screen.
>>
>> -Charles
>>
>> Jon Daley wrote:
>>> /var/www/secure/webmail>svn diff program/ Index:
>>> program/include/rcube_imap.inc
>>> ===================================================================
>>> --- program/include/rcube_imap.inc      (revision 1636)
>>> +++ program/include/rcube_imap.inc      (working copy)
>>> @@ -876,10 +876,11 @@
>>>      $a_messages = iil_C_Search($this->conn, $mailbox, $criteria);
>>>
>>>      // clean message list (there might be some empty entries)
>>> -    foreach ($a_messages as $i => $val)
>>> -      if (empty($val))
>>> -        unset($a_messages[$i]);
>>> -
>>> +    if($a_messages){
>>> +      foreach ($a_messages as $i => $val)
>>> +        if (empty($val))
>>> +          unset($a_messages[$i]);
>>> +    }
>>>      return $a_messages;
>>>      }
>>>
>>> /var/www/secure/webmail>svn commit -m "need to check value before
>> passing
>>>    to foreach.  search is also broken, so this might not be the real
>> fix"
>>>
>>>
>>> Maybe I will get a chance to see what is broken with the search too.
>>>





More information about the Dev mailing list