summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2006-05-15 20:54:33 +0000
committerthomascube <thomas@roundcube.net>2006-05-15 20:54:33 +0000
commit4f2d81edf383b57c81faa8fc3f41d75f34c08bc8 (patch)
tree5349544f25965ac7430a376b85ee8ed1a09fa4ea
parente1cf7c4c356495fb53db086d0e46dfe0a75f319c (diff)
Fixed search bugs
-rw-r--r--program/include/rcube_imap.inc11
1 files changed, 7 insertions, 4 deletions
diff --git a/program/include/rcube_imap.inc b/program/include/rcube_imap.inc
index 30e6eb8d2..53cec7a24 100644
--- a/program/include/rcube_imap.inc
+++ b/program/include/rcube_imap.inc
@@ -856,7 +856,7 @@ class rcube_imap
$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
@@ -876,9 +876,12 @@ class rcube_imap
$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 (is_array($a_messages))
+ {
+ foreach ($a_messages as $i => $val)
+ if (empty($val))
+ unset($a_messages[$i]);
+ }
return $a_messages;
}