Skip to content

Commit

Permalink
Fix expiring sent-mail label if identity ID changes
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Aug 6, 2014
1 parent 4b1c761 commit f258345
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions imp/lib/Prefs/Identity.php
Expand Up @@ -63,6 +63,24 @@ public function __construct($params)
parent::__construct($params);
}

/**
*/
public function save()
{
global $injector;

parent::save();

/* Changing the ID may change the sent-mail names, so clear the
* display cache.
* @todo If identity ID is changed outside of Horde, this won't be
* caught. */
$sc = $injector->getInstance('IMP_Mailbox_SessionCache');
foreach ($this->getAllSentmail() as $val) {
$sc->expire(IMP_Mailbox_SessionCache::CACHE_DISPLAY, $val);
}
}

/**
* Verifies and sanitizes all identity properties.
*
Expand Down

0 comments on commit f258345

Please sign in to comment.