Fix rebuilding of mailbox on message action
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 20 Feb 2009 21:03:43 +0000 (14:03 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 20 Feb 2009 21:03:43 +0000 (14:03 -0700)
imp/lib/Mailbox.php

index 998ab27..145f3a5 100644 (file)
@@ -562,6 +562,10 @@ class IMP_Mailbox
 
         case 'uid':
             $this->_arrayIndex = $this->getArrayIndex($data);
+            if (empty($this->_arrayIndex)) {
+                $this->_rebuild(true);
+                $this->_arrayIndex = $this->getArrayIndex($data);
+            }
             break;
         }
     }
@@ -597,7 +601,7 @@ class IMP_Mailbox
             (!is_null($this->_arrayIndex) &&
              !$this->_searchmbox &&
              !$this->getIMAPIndex(1))) {
-            $this->_build = false;
+            $this->_sorted = null;
             $this->_buildMailbox();
         }
     }