Skip to content
Snippets Groups Projects
Commit 864ea4d1 authored by Jared Hancock's avatar Jared Hancock
Browse files

tnef: Send size of attachments for de-duplication

parent 953fe9bb
No related branches found
No related tags found
No related merge requests found
......@@ -655,6 +655,7 @@ class MailFetcher {
$attachments[] = array(
'cid' => @$at->AttachContentId ?: false,
'data' => $at,
'size' => @$at->DataSize ?: null,
'type' => @$at->AttachMimeTag ?: false,
'name' => $at->getName(),
);
......
......@@ -418,6 +418,7 @@ class Mail_Parse {
$files[] = array(
'cid' => @$at->AttachContentId ?: false,
'data' => $at->getData(),
'size' => @$at->DataSize ?: null,
'type' => @$at->AttachMimeTag ?: false,
'name' => $at->getName(),
);
......
......@@ -491,6 +491,7 @@ class TnefStreamParser {
break;
case self::attAttachData:
$attach->_setData($info['data']);
$attach->_setDataSize($info['length']);
break;
}
}
......@@ -557,6 +558,10 @@ class TnefAttachment extends AbstractTnefObject {
$this->Data = $data;
}
function _setDataSize($size) {
$this->DataSize = $size;
}
function getData() {
if (isset($this->Data))
return $this->Data;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment