public function execute()
{
$this->_upgradeAbookPrefs();
+ $this->_upgradeExpireImapCache();
$this->_upgradeForwardPrefs();
$this->_upgradeLoginTasksPrefs();
$this->_upgradeSortPrefs();
}
/**
+ * Expire existing IMAP cache.
+ */
+ protected function _upgradeExpireImapCache()
+ {
+ try {
+ $ob = $injector->getInstance('IMP_Imap')->getOb()->ob;
+ $ob->login();
+
+ $mboxes = $ob->listMailboxes('*', Horde_Imap_Client::MBOX_ALL, array('flat' => true));
+
+ foreach ($mboxes as $val) {
+ $ob->cache->deleteMailbox($val);
+ }
+ } catch (Exception $e) {}
+ }
+
+ /**
* Upgrade to the new forward preferences.
*/
protected function _upgradeForwardPrefs()