* Mail: vaction notice indicator in mail showed result of other users

cache-key was identical for all uses due to a typo
This commit is contained in:
Ralf Becker 2014-09-27 15:28:16 +00:00
parent 041f06c855
commit b9c985e045
2 changed files with 4 additions and 4 deletions

View File

@ -621,9 +621,9 @@ class mail_sieve
self::setAsyncJob($newVacation); self::setAsyncJob($newVacation);
} }
//Reset vacationNotice cache which is used in mail_ui get_rows //Reset vacationNotice cache which is used in mail_ui get_rows
$cachedVacations = egw_cache::getCache(egw_cache::INSTANCE, 'email', 'vacationNotice'+$GLOBALS['egw_info']['user']['account_lid']); $cachedVacations = egw_cache::getCache(egw_cache::INSTANCE, 'email', 'vacationNotice'.$GLOBALS['egw_info']['user']['account_lid']);
$cachedVacations = array($icServer->acc_id => $newVacation) + (array)$cachedVacations; $cachedVacations = array($icServer->acc_id => $newVacation) + (array)$cachedVacations;
egw_cache::setCache(egw_cache::INSTANCE,'email', 'vacationNotice'+$GLOBALS['egw_info']['user']['account_lid'], $cachedVacations); egw_cache::setCache(egw_cache::INSTANCE,'email', 'vacationNotice'.$GLOBALS['egw_info']['user']['account_lid'], $cachedVacations);
$msg = lang('Vacation notice sucessfully updated.'); $msg = lang('Vacation notice sucessfully updated.');
} }

View File

@ -2290,7 +2290,7 @@ class mail_ui
$cachedVacations = array($sieveServer->acc_id => $vacation) + (array)$cachedVacations; $cachedVacations = array($sieveServer->acc_id => $vacation) + (array)$cachedVacations;
// Set vacation to the instance cache for particular account with expiration of one day // Set vacation to the instance cache for particular account with expiration of one day
egw_cache::setCache(egw_cache::INSTANCE, 'email', 'vacationNotice'+$GLOBALS['egw_info']['user']['account_lid'], $cachedVacations, 60*60*24); egw_cache::setCache(egw_cache::INSTANCE, 'email', 'vacationNotice'.$GLOBALS['egw_info']['user']['account_lid'], $cachedVacations, 60*60*24);
} }
catch (PEAR_Exception $ex) catch (PEAR_Exception $ex)
{ {
@ -3917,7 +3917,7 @@ class mail_ui
public static function ajax_refreshVacationNotice($icServerID=null) public static function ajax_refreshVacationNotice($icServerID=null)
{ {
//Get vacation from cache if it's available //Get vacation from cache if it's available
$cachedVacations = egw_cache::getCache(egw_cache::INSTANCE, 'email', 'vacationNotice'+$GLOBALS['egw_info']['user']['account_lid']); $cachedVacations = egw_cache::getCache(egw_cache::INSTANCE, 'email', 'vacationNotice'.$GLOBALS['egw_info']['user']['account_lid']);
$vacation = $cachedVacations[$icServerID]; $vacation = $cachedVacations[$icServerID];
if (!$vacation) if (!$vacation)