mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-08 22:40:23 +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]);
|
unset($structure[$_profileID]);
|
||||||
egw_cache::setCache(egw_cache::INSTANCE,'email','structureCache'.trim($GLOBALS['egw_info']['user']['account_id']),$structure, $expiration=60*60*1);
|
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
|
//reset folderObject cache, to trigger reload
|
||||||
felamimail_bo::resetFolderObjectCache($_profileID);
|
felamimail_bo::resetFolderObjectCache($_profileID);
|
||||||
//reset counter of deleted messages per folder
|
//reset counter of deleted messages per folder
|
||||||
|
@ -384,11 +384,11 @@ class emailadmin_script {
|
|||||||
if (trim($vacation['forwards'])) {
|
if (trim($vacation['forwards'])) {
|
||||||
$if = array();
|
$if = array();
|
||||||
foreach($vacation['addresses'] as $addr) {
|
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";
|
$newscriptbody .= 'if anyof ('.implode(', ',$if).") {\n";
|
||||||
foreach(preg_split('/, ?/',$vacation['forwards']) as $addr) {
|
foreach(preg_split('/, ?/',$vacation['forwards']) as $addr) {
|
||||||
$newscriptbody .= "\tredirect \"".$addr."\";\n";
|
$newscriptbody .= "\tredirect \"".trim($addr)."\";\n";
|
||||||
}
|
}
|
||||||
$newscriptbody .= "\tkeep;\n}\n";
|
$newscriptbody .= "\tkeep;\n}\n";
|
||||||
}
|
}
|
||||||
@ -397,7 +397,7 @@ class emailadmin_script {
|
|||||||
$first = 1;
|
$first = 1;
|
||||||
foreach ($vacation['addresses'] as $vaddress) {
|
foreach ($vacation['addresses'] as $vaddress) {
|
||||||
if (!$first) $newscriptbody .= ", ";
|
if (!$first) $newscriptbody .= ", ";
|
||||||
$newscriptbody .= "\"" . $vaddress . "\"";
|
$newscriptbody .= "\"" . trim($vaddress) . "\"";
|
||||||
$first = 0;
|
$first = 0;
|
||||||
}
|
}
|
||||||
$message = $vacation['text'];
|
$message = $vacation['text'];
|
||||||
@ -510,7 +510,7 @@ class emailadmin_script {
|
|||||||
$first = 1;
|
$first = 1;
|
||||||
foreach ($vacation['addresses'] as $address) {
|
foreach ($vacation['addresses'] as $address) {
|
||||||
if (!$first) $newscriptfoot .= ", ";
|
if (!$first) $newscriptfoot .= ", ";
|
||||||
$newscriptfoot .= "\"" . $address . "\"";
|
$newscriptfoot .= "\"" . trim($address) . "\"";
|
||||||
$first = 0;
|
$first = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user