From 2b0324a89ced9404c7cfffe549fe9bb39d5d27b8 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Fri, 22 Jan 2010 11:59:06 -0700 Subject: [PATCH] Always clear sorted array when building mailbox --- imp/lib/Mailbox.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/imp/lib/Mailbox.php b/imp/lib/Mailbox.php index c58b9f30c..85168a220 100644 --- a/imp/lib/Mailbox.php +++ b/imp/lib/Mailbox.php @@ -316,6 +316,7 @@ class IMP_Mailbox } $this->_changed = true; + $this->_sorted = $this->_sortedMbox = array(); $query = null; if ($this->_searchmbox) { @@ -331,7 +332,6 @@ class IMP_Mailbox $this->_sortedMbox[] = $mbox; } } catch (Horde_Imap_Client_Exception $e) { - $this->_sorted = $this->_sortedMbox = array(); $GLOBALS['notification']->push(_("Mailbox listing failed") . ': ' . $e->getMessage(), 'horde.error'); } } else { @@ -351,7 +351,6 @@ class IMP_Mailbox $res = $GLOBALS['imp_search']->imapSearch($this->_mailbox, $query, array('sort' => array($sortpref['by']), 'reverse' => (bool)$sortpref['dir'])); $this->_sorted = $res['sort']; } catch (Horde_Imap_Client_Exception $e) { - $this->_sorted = array(); $GLOBALS['notification']->push(_("Mailbox listing failed") . ': ' . $e->getMessage(), 'horde.error'); } } -- 2.11.0