mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
N°8911 - Attachment visualisation broken
This commit is contained in:
@@ -67,15 +67,17 @@ class EventListener implements iEventServiceSetup
|
|||||||
/** @var \DBObject $oAttachment */
|
/** @var \DBObject $oAttachment */
|
||||||
$oAttachment = $oEventData->Get('object');
|
$oAttachment = $oEventData->Get('object');
|
||||||
$oHostObj = MetaModel::GetObject($oAttachment->Get('item_class'), $oAttachment->Get('item_id'), false /* false to avoid exception during trigger */, true);
|
$oHostObj = MetaModel::GetObject($oAttachment->Get('item_class'), $oAttachment->Get('item_id'), false /* false to avoid exception during trigger */, true);
|
||||||
/** @var \ormDocument $oDocument */
|
if ($oHostObj != null) {
|
||||||
$oDocument = $oEventData->Get('document');
|
/** @var \ormDocument $oDocument */
|
||||||
|
$oDocument = $oEventData->Get('document');
|
||||||
|
|
||||||
$this->OnAttachmentActivateTriggers(
|
$this->OnAttachmentActivateTriggers(
|
||||||
$oHostObj,
|
$oHostObj,
|
||||||
$oAttachment,
|
$oAttachment,
|
||||||
$oDocument,
|
$oDocument,
|
||||||
TriggerOnAttachmentDownload::class
|
TriggerOnAttachmentDownload::class
|
||||||
);
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user