|
@@ 3846-3860 (lines=15) @@
|
| 3843 |
|
//error_log(__METHOD__.' ('.__LINE__.') '.'->'.array2string($_messageUID).','.array2string($_folder).', '.$_forceDeleteMethod); |
| 3844 |
|
$oldMailbox = ''; |
| 3845 |
|
if (is_null($_folder) || empty($_folder)) $_folder = $this->sessionData['mailbox']; |
| 3846 |
|
if (empty($_messageUID)) |
| 3847 |
|
{ |
| 3848 |
|
if (self::$debug) error_log(__METHOD__." no messages Message(s): ".implode(',',$_messageUID)); |
| 3849 |
|
return false; |
| 3850 |
|
} |
| 3851 |
|
elseif ($_messageUID==='all') |
| 3852 |
|
{ |
| 3853 |
|
$_messageUID= null; |
| 3854 |
|
} |
| 3855 |
|
else |
| 3856 |
|
{ |
| 3857 |
|
$uidsToDelete = new Horde_Imap_Client_Ids(); |
| 3858 |
|
if (!(is_object($_messageUID) || is_array($_messageUID))) $_messageUID = (array)$_messageUID; |
| 3859 |
|
$uidsToDelete->add($_messageUID); |
| 3860 |
|
} |
| 3861 |
|
$deleteOptions = $_forceDeleteMethod; // use forceDeleteMethod if not "no", or unknown method |
| 3862 |
|
if ($_forceDeleteMethod === 'no' || !in_array($_forceDeleteMethod,array('move_to_trash',"mark_as_deleted","remove_immediately"))) $deleteOptions = ($this->mailPreferences['deleteOptions']?$this->mailPreferences['deleteOptions']:"mark_as_deleted"); |
| 3863 |
|
//error_log(__METHOD__.' ('.__LINE__.') '.'->'.array2string($_messageUID).','.$_folder.'/'.$this->sessionData['mailbox'].' Option:'.$deleteOptions); |
|
@@ 4169-4185 (lines=17) @@
|
| 4166 |
|
{ |
| 4167 |
|
$source = Mail\Account::read(($_sourceProfileID?$_sourceProfileID:$this->icServer->ImapServerId))->imapServer(); |
| 4168 |
|
//$deleteOptions = $GLOBALS['egw_info']["user"]["preferences"]["mail"]["deleteOptions"]; |
| 4169 |
|
if (empty($_messageUID)) |
| 4170 |
|
{ |
| 4171 |
|
if (self::$debug) error_log(__METHOD__." no Message(s): ".implode(',',$_messageUID)); |
| 4172 |
|
return false; |
| 4173 |
|
} |
| 4174 |
|
elseif ($_messageUID==='all') |
| 4175 |
|
{ |
| 4176 |
|
//error_log(__METHOD__." all Message(s): ".implode(',',$_messageUID)); |
| 4177 |
|
$uidsToMove= null; |
| 4178 |
|
} |
| 4179 |
|
else |
| 4180 |
|
{ |
| 4181 |
|
//error_log(__METHOD__." Message(s): ".implode(',',$_messageUID)); |
| 4182 |
|
$uidsToMove = new Horde_Imap_Client_Ids(); |
| 4183 |
|
if (!(is_object($_messageUID) || is_array($_messageUID))) $_messageUID = (array)$_messageUID; |
| 4184 |
|
$uidsToMove->add($_messageUID); |
| 4185 |
|
} |
| 4186 |
|
$sourceFolder = (!empty($currentFolder)?$currentFolder: $this->sessionData['mailbox']); |
| 4187 |
|
//error_log(__METHOD__.__LINE__."$_targetProfileID !== ".array2string($source->ImapServerId)); |
| 4188 |
|
if (!is_null($_targetProfileID) && $_targetProfileID !== $source->ImapServerId) |