From 304b2a45e16a454d10ba2729017be7a46d836aec Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Thu, 22 Oct 2009 14:25:23 -0600 Subject: [PATCH] Remove debug artifact and optimize a bit. --- imp/lib/Search.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/imp/lib/Search.php b/imp/lib/Search.php index 1fb9dfb54..b163ef919 100644 --- a/imp/lib/Search.php +++ b/imp/lib/Search.php @@ -327,12 +327,9 @@ class IMP_Search * Although there is a fallback to a PHP-based display sort, for * performance reasons only do a display sort if it is supported * on the server. */ - if (($_SESSION['imp']['protocol'] == 'imap') && - isset($opts['sort']) && - (in_array(Horde_Imap_Client::SORT_FROM, $opts['sort']) || - in_array(Horde_Imap_Client::SORT_TO, $opts['sort']))) { + if (($_SESSION['imp']['protocol'] == 'imap') && isset($opts['sort'])) { $sort_cap = $GLOBALS['imp_imap']->ob()->queryCapability('SORT'); - print_r($sort_cap); + if (is_array($sort_cap) && in_array('DISPLAY', $sort_cap)) { $pos = array_search(Horde_Imap_Client::SORT_FROM, $opts['sort']); if ($pos !== false) { -- 2.11.0