mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-24 15:48:55 +01:00
on deleting auto-draft-messages, use remove_immediately, to avoid cluttering the trash-box
This commit is contained in:
parent
154b8ac761
commit
0b3e5228ac
@ -335,7 +335,7 @@ class ajaxfelamimail
|
||||
if (isset($bocompose->sessionData['lastDrafted'])) $lastDrafted = $bocompose->sessionData['lastDrafted'];
|
||||
$messageUid = $bocompose->saveAsDraft($formData,$folder); // folder may change
|
||||
if ($lastDrafted && is_array($lastDrafted) && isset($lastDrafted['uid']) && !empty($lastDrafted['uid'])) $lastDrafted['uid'] = trim($lastDrafted['uid']);
|
||||
if ($lastDrafted && is_array($lastDrafted) && isset($lastDrafted['uid']) && !empty($lastDrafted['uid'])) $this->bofelamimail->deleteMessages((array)$lastDrafted['uid'],$lastDrafted['folder']);
|
||||
if ($lastDrafted && is_array($lastDrafted) && isset($lastDrafted['uid']) && !empty($lastDrafted['uid'])) $this->bofelamimail->deleteMessages((array)$lastDrafted['uid'],$lastDrafted['folder'],"remove_immediately");
|
||||
if ($_autoSave)
|
||||
{
|
||||
$bocompose->sessionData['lastDrafted'] = array('uid'=>$messageUid,'folder'=>$folder);
|
||||
|
@ -1171,7 +1171,7 @@
|
||||
if (isset($lastDrafted['uid']) && (empty($lastDrafted['uid']) || $lastDrafted['uid'] == $this->sessionData['uid'])) $lastDrafted=false;
|
||||
//error_log(__METHOD__.__LINE__.array2string($lastDrafted));
|
||||
}
|
||||
if ($lastDrafted && is_array($lastDrafted) && $bofelamimail->isDraftFolder($lastDrafted['folder'])) $bofelamimail->deleteMessages((array)$lastDrafted['uid'],$lastDrafted['folder']);
|
||||
if ($lastDrafted && is_array($lastDrafted) && $bofelamimail->isDraftFolder($lastDrafted['folder'])) $bofelamimail->deleteMessages((array)$lastDrafted['uid'],$lastDrafted['folder'],"remove_immediately");
|
||||
unset($this->sessionData['lastDrafted']);
|
||||
|
||||
//error_log("handling draft messages, flagging and such");
|
||||
|
@ -824,7 +824,7 @@ class felamimail_bo
|
||||
return true;
|
||||
}
|
||||
|
||||
function deleteMessages($_messageUID, $_folder=NULL)
|
||||
function deleteMessages($_messageUID, $_folder=NULL, $_forceDeleteMethod='no')
|
||||
{
|
||||
//error_log(__METHOD__.__LINE__.'->'.array2string($_messageUID).','.$_folder);
|
||||
$msglist = '';
|
||||
@ -842,8 +842,8 @@ class felamimail_bo
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$deleteOptions = $this->mailPreferences->preferences['deleteOptions'];
|
||||
$deleteOptions = $_forceDeleteMethod; // use forceDeleteMethod if not "no", or unknown method
|
||||
if ($_forceDeleteMethod === 'no' || !in_array($_forceDeleteMethod,array('move_to_trash',"mark_as_deleted","remove_immediately"))) $deleteOptions = $this->mailPreferences->preferences['deleteOptions'];
|
||||
$trashFolder = $this->mailPreferences->preferences['trashFolder'];
|
||||
$draftFolder = $this->mailPreferences->preferences['draftFolder']; //$GLOBALS['egw_info']['user']['preferences']['felamimail']['draftFolder'];
|
||||
$templateFolder = $this->mailPreferences->preferences['templateFolder']; //$GLOBALS['egw_info']['user']['preferences']['felamimail']['templateFolder'];
|
||||
@ -989,14 +989,14 @@ class felamimail_bo
|
||||
function getNotifyFlags ($_messageUID, $flags=null)
|
||||
{
|
||||
if($flags===null) $flags = $this->icServer->getFlags($_messageUID, true);
|
||||
if (self::$debug) error_log(__METHOD__.$_messageUID.array2string($flags));
|
||||
if (self::$debug) error_log(__METHOD__.$_messageUID.' Flags:'.array2string($flags));
|
||||
if (PEAR::isError($flags)) {
|
||||
return null;
|
||||
}
|
||||
if ( in_array('MDNSent',$flags[0]) )
|
||||
if ( stripos( array2string($flags),'MDNSent')!==false)
|
||||
return true;
|
||||
|
||||
if ( in_array('MDNnotSent',$flags[0]) )
|
||||
if ( stripos( array2string($flags),'MDNnotSent')!==false)
|
||||
return false;
|
||||
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user