mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-22 22:08:45 +01:00
trim addresses used in sieve vacation rules; introduce the cleaning of another cache object
This commit is contained in:
parent
46be0018df
commit
32842953f4
@ -589,6 +589,12 @@ class emailadmin_bo extends so_sql
|
||||
unset($structure[$_profileID]);
|
||||
egw_cache::setCache(egw_cache::INSTANCE,'email','structureCache'.trim($GLOBALS['egw_info']['user']['account_id']),$structure, $expiration=60*60*1);
|
||||
}
|
||||
$rawHeadersCache = egw_cache::getCache(egw_cache::INSTANCE,'email','rawHeadersCache'.trim($GLOBALS['egw_info']['user']['account_id']),$callback=null,$callback_params=array(),$expiration=60*60*1);
|
||||
if (isset($rawHeadersCache[$_profileID]))
|
||||
{
|
||||
unset($rawHeadersCache[$_profileID]);
|
||||
egw_cache::setCache(egw_cache::INSTANCE,'email','rawHeadersCache'.trim($GLOBALS['egw_info']['user']['account_id']),$rawHeadersCache, $expiration=60*60*1);
|
||||
}
|
||||
//reset folderObject cache, to trigger reload
|
||||
felamimail_bo::resetFolderObjectCache($_profileID);
|
||||
//reset counter of deleted messages per folder
|
||||
|
@ -384,11 +384,11 @@ class emailadmin_script {
|
||||
if (trim($vacation['forwards'])) {
|
||||
$if = array();
|
||||
foreach($vacation['addresses'] as $addr) {
|
||||
$if[] = 'address :contains ["To","TO","Cc","CC"] "'.$addr.'"';
|
||||
$if[] = 'address :contains ["To","TO","Cc","CC"] "'.trim($addr).'"';
|
||||
}
|
||||
$newscriptbody .= 'if anyof ('.implode(', ',$if).") {\n";
|
||||
foreach(preg_split('/, ?/',$vacation['forwards']) as $addr) {
|
||||
$newscriptbody .= "\tredirect \"".$addr."\";\n";
|
||||
$newscriptbody .= "\tredirect \"".trim($addr)."\";\n";
|
||||
}
|
||||
$newscriptbody .= "\tkeep;\n}\n";
|
||||
}
|
||||
@ -397,7 +397,7 @@ class emailadmin_script {
|
||||
$first = 1;
|
||||
foreach ($vacation['addresses'] as $vaddress) {
|
||||
if (!$first) $newscriptbody .= ", ";
|
||||
$newscriptbody .= "\"" . $vaddress . "\"";
|
||||
$newscriptbody .= "\"" . trim($vaddress) . "\"";
|
||||
$first = 0;
|
||||
}
|
||||
$message = $vacation['text'];
|
||||
@ -510,7 +510,7 @@ class emailadmin_script {
|
||||
$first = 1;
|
||||
foreach ($vacation['addresses'] as $address) {
|
||||
if (!$first) $newscriptfoot .= ", ";
|
||||
$newscriptfoot .= "\"" . $address . "\"";
|
||||
$newscriptfoot .= "\"" . trim($address) . "\"";
|
||||
$first = 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user