From 34f44b97acb238ed82c42829a425c67a4fcf7e6d Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Fri, 15 May 2009 15:24:58 -0600 Subject: [PATCH] Fix deleting last message in search mailbox --- imp/lib/Mailbox.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/imp/lib/Mailbox.php b/imp/lib/Mailbox.php index cd86057dd..b780742bd 100644 --- a/imp/lib/Mailbox.php +++ b/imp/lib/Mailbox.php @@ -420,6 +420,7 @@ class IMP_Mailbox public function isValidIndex() { $this->_rebuild(); + $this->setIndex(0, 'offset'); return !is_null($this->_arrayIndex); } @@ -635,9 +636,7 @@ class IMP_Mailbox protected function _rebuild($force = false) { if ($force || - (!is_null($this->_arrayIndex) && - !$this->_searchmbox && - !$this->getIMAPIndex(1))) { + (!is_null($this->_arrayIndex) && !$this->getIMAPIndex(1))) { $this->_sorted = null; $this->_buildMailbox(); } -- 2.11.0