|
@@ 3817-3831 (lines=15) @@
|
| 3814 |
|
//error_log(__METHOD__.' ('.__LINE__.') '.'->'.array2string($_messageUID).','.array2string($_folder).', '.$_forceDeleteMethod); |
| 3815 |
|
$oldMailbox = ''; |
| 3816 |
|
if (is_null($_folder) || empty($_folder)) $_folder = $this->sessionData['mailbox']; |
| 3817 |
|
if (empty($_messageUID)) |
| 3818 |
|
{ |
| 3819 |
|
if (self::$debug) error_log(__METHOD__." no messages Message(s): ".implode(',',$_messageUID)); |
| 3820 |
|
return false; |
| 3821 |
|
} |
| 3822 |
|
elseif ($_messageUID==='all') |
| 3823 |
|
{ |
| 3824 |
|
$_messageUID= null; |
| 3825 |
|
} |
| 3826 |
|
else |
| 3827 |
|
{ |
| 3828 |
|
$uidsToDelete = new Horde_Imap_Client_Ids(); |
| 3829 |
|
if (!(is_object($_messageUID) || is_array($_messageUID))) $_messageUID = (array)$_messageUID; |
| 3830 |
|
$uidsToDelete->add($_messageUID); |
| 3831 |
|
} |
| 3832 |
|
$deleteOptions = $_forceDeleteMethod; // use forceDeleteMethod if not "no", or unknown method |
| 3833 |
|
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"); |
| 3834 |
|
//error_log(__METHOD__.' ('.__LINE__.') '.'->'.array2string($_messageUID).','.$_folder.'/'.$this->sessionData['mailbox'].' Option:'.$deleteOptions); |
|
@@ 4140-4156 (lines=17) @@
|
| 4137 |
|
{ |
| 4138 |
|
$source = Mail\Account::read(($_sourceProfileID?$_sourceProfileID:$this->icServer->ImapServerId))->imapServer(); |
| 4139 |
|
//$deleteOptions = $GLOBALS['egw_info']["user"]["preferences"]["mail"]["deleteOptions"]; |
| 4140 |
|
if (empty($_messageUID)) |
| 4141 |
|
{ |
| 4142 |
|
if (self::$debug) error_log(__METHOD__." no Message(s): ".implode(',',$_messageUID)); |
| 4143 |
|
return false; |
| 4144 |
|
} |
| 4145 |
|
elseif ($_messageUID==='all') |
| 4146 |
|
{ |
| 4147 |
|
//error_log(__METHOD__." all Message(s): ".implode(',',$_messageUID)); |
| 4148 |
|
$uidsToMove= null; |
| 4149 |
|
} |
| 4150 |
|
else |
| 4151 |
|
{ |
| 4152 |
|
//error_log(__METHOD__." Message(s): ".implode(',',$_messageUID)); |
| 4153 |
|
$uidsToMove = new Horde_Imap_Client_Ids(); |
| 4154 |
|
if (!(is_object($_messageUID) || is_array($_messageUID))) $_messageUID = (array)$_messageUID; |
| 4155 |
|
$uidsToMove->add($_messageUID); |
| 4156 |
|
} |
| 4157 |
|
$sourceFolder = (!empty($currentFolder)?$currentFolder: $this->sessionData['mailbox']); |
| 4158 |
|
//error_log(__METHOD__.__LINE__."$_targetProfileID !== ".array2string($source->ImapServerId)); |
| 4159 |
|
if (!is_null($_targetProfileID) && $_targetProfileID !== $source->ImapServerId) |