mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
fix for (sometimes) not attached attachment when composing as new, when triggered from message with attachments present
This commit is contained in:
parent
a8f158e72b
commit
0810011d0f
@ -1656,8 +1656,11 @@ class mail_compose
|
|||||||
|
|
||||||
if(($attachments = $mail_bo->getMessageAttachments($_uid,$_partID))) {
|
if(($attachments = $mail_bo->getMessageAttachments($_uid,$_partID))) {
|
||||||
foreach($attachments as $attachment) {
|
foreach($attachments as $attachment) {
|
||||||
|
//error_log(__METHOD__.__LINE__.array2string($attachment));
|
||||||
$cid = $attachment['cid'];
|
$cid = $attachment['cid'];
|
||||||
preg_match("/[cid:{$cid}]/", $bodyParts['0']['body'], $match);
|
$match=null;
|
||||||
|
preg_match("/cid:{$cid}/", $bodyParts['0']['body'], $match);
|
||||||
|
//error_log(__METHOD__.__LINE__.'searching for cid:'."/cid:{$cid}/".'#'.$r.'#'.array2string($match));
|
||||||
if (!$match || !$attachment['cid'])
|
if (!$match || !$attachment['cid'])
|
||||||
{
|
{
|
||||||
$this->addMessageAttachment($_uid, $attachment['partID'],
|
$this->addMessageAttachment($_uid, $attachment['partID'],
|
||||||
@ -2565,8 +2568,14 @@ class mail_compose
|
|||||||
$success = false;
|
$success = false;
|
||||||
error_log(__METHOD__.__LINE__.$msg);
|
error_log(__METHOD__.__LINE__.$msg);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
error_log(__METHOD__.__LINE__.': original message ('.$pMuid.') has attachments and lastDrafted ID ('.$duid.') equals the former');
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
error_log(__METHOD__.__LINE__." No current draftID (".$draft_id."), or no lastDrafted Info (".$content['lastDrafted'].") or the former being equal:".array2string($content)."(, action=$action)");
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
error_log(__METHOD__.__LINE__.' No headerdata found for messageUID='.$messageUid.' in Folder:'.$folder.':'.array2string($content)."(, action=$action)");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user