From 9843e8b7940e9fd39d1faca34cc2b2343553f85d Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Wed, 1 Sep 2010 13:44:55 -0600 Subject: [PATCH] Fix determination whether POP3 search query is valid. --- framework/Imap_Client/lib/Horde/Imap/Client/Search/Query.php | 4 ++-- framework/Imap_Client/lib/Horde/Imap/Client/Socket/Pop3.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/framework/Imap_Client/lib/Horde/Imap/Client/Search/Query.php b/framework/Imap_Client/lib/Horde/Imap/Client/Search/Query.php index 495f81829..60de6d0fa 100644 --- a/framework/Imap_Client/lib/Horde/Imap/Client/Search/Query.php +++ b/framework/Imap_Client/lib/Horde/Imap/Client/Search/Query.php @@ -101,8 +101,8 @@ class Horde_Imap_Client_Search_Query * 'charset' - (string) The charset of the search string. * 'exts' - (array) The list of IMAP extensions used to create the string. * 'imap4' - (boolean) True if the search uses IMAP4 criteria (as opposed - * to IMAP2 search criteria) - * 'query' - (string) The IMAP search string + * to IMAP2 search criteria). + * 'query' - (array) The IMAP search string. * * @throws Horde_Imap_Client_Exception */ diff --git a/framework/Imap_Client/lib/Horde/Imap/Client/Socket/Pop3.php b/framework/Imap_Client/lib/Horde/Imap/Client/Socket/Pop3.php index 6a9535e4d..076fe2d98 100644 --- a/framework/Imap_Client/lib/Horde/Imap/Client/Socket/Pop3.php +++ b/framework/Imap_Client/lib/Horde/Imap/Client/Socket/Pop3.php @@ -650,7 +650,7 @@ class Horde_Imap_Client_Socket_Pop3 extends Horde_Imap_Client_Base : reset($options['sort']); // Only support a single query: an ALL search sorted by sequence. - if (($options['_query']['query'] != 'ALL') || + if ((reset($options['_query']['query']) != 'ALL') || ($sort && ((count($options['sort']) > 1) || ($sort != Horde_Imap_Client::SORT_SEQUENCE)))) { -- 2.11.0