mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-30 03:43:40 +01:00
pass folder info explizitly on even more bo calls to cancel out problems there
This commit is contained in:
parent
658b773dc1
commit
d0e562ebef
@ -743,8 +743,8 @@ class mail_activesync implements activesync_plugin_write, activesync_plugin_send
|
|||||||
if ($preferencesArray['message_forwarding'] == 'asmail')
|
if ($preferencesArray['message_forwarding'] == 'asmail')
|
||||||
{
|
{
|
||||||
$rawHeader='';
|
$rawHeader='';
|
||||||
$rawHeader = $this->mail->getMessageRawHeader($smartdata['itemid'], $_partID);
|
$rawHeader = $this->mail->getMessageRawHeader($smartdata['itemid'], $_partID,$folder);
|
||||||
$rawBody = $this->mail->getMessageRawBody($smartdata['itemid'], $_partID);
|
$rawBody = $this->mail->getMessageRawBody($smartdata['itemid'], $_partID,$folder);
|
||||||
$mailObject->AddStringAttachment($rawHeader.$rawBody, $mailObject->EncodeHeader($headers['SUBJECT']), '7bit', 'message/rfc822');
|
$mailObject->AddStringAttachment($rawHeader.$rawBody, $mailObject->EncodeHeader($headers['SUBJECT']), '7bit', 'message/rfc822');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -780,6 +780,9 @@ class mail_activesync implements activesync_plugin_write, activesync_plugin_send
|
|||||||
$body .= $bodyBUFF;
|
$body .= $bodyBUFF;
|
||||||
// get all the attachments and add them too.
|
// get all the attachments and add them too.
|
||||||
// start handle Attachments
|
// start handle Attachments
|
||||||
|
// $_uid, $_partID=null, Horde_Mime_Part $_structure=null, $fetchEmbeddedImages=true, $fetchTextCalendar=false, $resolveTNEF=true, $_folderName=''
|
||||||
|
$attachments = $this->mail->getMessageAttachments($uid, null, null, true, false, true , $folder);
|
||||||
|
|
||||||
$attachments = $this->mail->getMessageAttachments($uid);
|
$attachments = $this->mail->getMessageAttachments($uid);
|
||||||
$attachmentNames = false;
|
$attachmentNames = false;
|
||||||
if (is_array($attachments) && count($attachments)>0)
|
if (is_array($attachments) && count($attachments)>0)
|
||||||
@ -793,8 +796,8 @@ class mail_activesync implements activesync_plugin_write, activesync_plugin_send
|
|||||||
{
|
{
|
||||||
case 'MESSAGE/RFC822':
|
case 'MESSAGE/RFC822':
|
||||||
$rawHeader = $rawBody = '';
|
$rawHeader = $rawBody = '';
|
||||||
$rawHeader = $this->mail->getMessageRawHeader($uid, $attachment['partID']);
|
$rawHeader = $this->mail->getMessageRawHeader($uid, $attachment['partID'],$folder);
|
||||||
$rawBody = $this->mail->getMessageRawBody($uid, $attachment['partID']);
|
$rawBody = $this->mail->getMessageRawBody($uid, $attachment['partID'],$folder);
|
||||||
$mailObject->AddStringAttachment($rawHeader.$rawBody, $mailObject->EncodeHeader($attachment['name']), '7bit', 'message/rfc822');
|
$mailObject->AddStringAttachment($rawHeader.$rawBody, $mailObject->EncodeHeader($attachment['name']), '7bit', 'message/rfc822');
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -1204,7 +1207,8 @@ class mail_activesync implements activesync_plugin_write, activesync_plugin_send
|
|||||||
}
|
}
|
||||||
// we still need the attachments to be added ( if there are any )
|
// we still need the attachments to be added ( if there are any )
|
||||||
// start handle Attachments
|
// start handle Attachments
|
||||||
$attachments = $this->mail->getMessageAttachments($id);
|
// $_uid, $_partID=null, Horde_Mime_Part $_structure=null, $fetchEmbeddedImages=true, $fetchTextCalendar=false, $resolveTNEF=true, $_folderName=''
|
||||||
|
$attachments = $this->mail->getMessageAttachments($id, null, null, true, false, true , $_folderName);
|
||||||
if (is_array($attachments) && count($attachments)>0)
|
if (is_array($attachments) && count($attachments)>0)
|
||||||
{
|
{
|
||||||
debugLog(__METHOD__.__LINE__.' gather Attachments for BodyCreation of/for MessageID:'.$id.' found:'.count($attachments));
|
debugLog(__METHOD__.__LINE__.' gather Attachments for BodyCreation of/for MessageID:'.$id.' found:'.count($attachments));
|
||||||
|
@ -4384,15 +4384,17 @@ class mail_bo
|
|||||||
* @param boolean $fetchEmbeddedImages=true,
|
* @param boolean $fetchEmbeddedImages=true,
|
||||||
* @param boolean $fetchTextCalendar=false,
|
* @param boolean $fetchTextCalendar=false,
|
||||||
* @param boolean $resolveTNEF=true
|
* @param boolean $resolveTNEF=true
|
||||||
|
* @param string $_folder folder to work on
|
||||||
* @return array an array of information about the attachment: array of array(name, size, mimeType, partID, encoding)
|
* @return array an array of information about the attachment: array of array(name, size, mimeType, partID, encoding)
|
||||||
*/
|
*/
|
||||||
function getMessageAttachments($_uid, $_partID=null, Horde_Mime_Part $_structure=null, $fetchEmbeddedImages=true, $fetchTextCalendar=false, $resolveTNEF=true)
|
function getMessageAttachments($_uid, $_partID=null, Horde_Mime_Part $_structure=null, $fetchEmbeddedImages=true, $fetchTextCalendar=false, $resolveTNEF=true, $_folder='')
|
||||||
{
|
{
|
||||||
if (self::$debug) error_log( __METHOD__.":$_uid, $_partID");
|
if (self::$debug) error_log( __METHOD__.":$_uid, $_partID");
|
||||||
|
if (empty($_folder)) $_folder = ($this->sessionData['mailbox']? $this->sessionData['mailbox'] : $this->icServer->getCurrentMailbox());
|
||||||
|
|
||||||
if (!isset($_structure))
|
if (!isset($_structure))
|
||||||
{
|
{
|
||||||
$_structure = $this->getStructure($_uid, $_partID,null,true);
|
$_structure = $this->getStructure($_uid, $_partID,$_folder,true);
|
||||||
}
|
}
|
||||||
if (!$_structure || !$_structure->contentTypeMap()) return array();
|
if (!$_structure || !$_structure->contentTypeMap()) return array();
|
||||||
foreach($_structure->contentTypeMap() as $mime_id => $mime_type)
|
foreach($_structure->contentTypeMap() as $mime_id => $mime_type)
|
||||||
|
Loading…
Reference in New Issue
Block a user