From: Michael M Slusarz Date: Fri, 22 Jan 2010 18:59:06 +0000 (-0700) Subject: Always clear sorted array when building mailbox X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=2b0324a89ced9404c7cfffe549fe9bb39d5d27b8;p=horde.git Always clear sorted array when building mailbox --- 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'); } }