From: Michael M Slusarz Date: Fri, 15 May 2009 21:24:58 +0000 (-0600) Subject: Fix deleting last message in search mailbox X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=34f44b97acb238ed82c42829a425c67a4fcf7e6d;p=horde.git Fix deleting last message in search mailbox --- 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(); }