Inline images in formatted case log & descriptions: beta version fixperms js The inline images are now no longer stored stored as Attachments but using a specific object InlineImage...

SVN:trunk[3926]
This commit is contained in:
Denis Flaven
2016-02-25 15:06:04 +00:00
parent 9c16b08e22
commit 608e94a613
107 changed files with 4676 additions and 196 deletions

View File

@@ -226,15 +226,15 @@ class EMail
@$oDOMDoc->loadHTML('<?xml encoding="UTF-8"?>'.$this->m_aData['body']['body']); // For loading HTML chunks where the character set is not specified
$oXPath = new DOMXPath($oDOMDoc);
$sXPath = "//img[@data-att-id]";
$sXPath = "//img[@data-img-id]";
$oImagesList = $oXPath->query($sXPath);
if ($oImagesList->length != 0)
{
foreach($oImagesList as $oImg)
{
$iAttId = $oImg->getAttribute('data-att-id');
$oAttachment = MetaModel::GetObject('Attachment', $iAttId, false, true /* Allow All Data */);
$iAttId = $oImg->getAttribute('data-img-id');
$oAttachment = MetaModel::GetObject('InlineImage', $iAttId, false, true /* Allow All Data */);
if ($oAttachment)
{
$oDoc = $oAttachment->Get('contents');