mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
N°2889 - Add placeholders for file data base64-encoded (simplifies many webhook calls)
This commit is contained in:
@@ -67,6 +67,7 @@ class EventListener implements iEventServiceSetup
|
||||
'attachment->file_name' => $oDocument->GetFileName(),
|
||||
'attachment->downloads_count' => $oDocument->GetDownloadsCount(),
|
||||
'attachment->data' => $oDocument->GetData(),
|
||||
'attachment->data_as_base64' => base64_encode($oDocument->GetData()),
|
||||
];
|
||||
$aTriggerParams = array('class_list' => MetaModel::EnumParentClasses($oAttachment->Get('item_class'), ENUM_PARENT_CLASSES_ALL));
|
||||
$oTriggerSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT $sTriggerClass AS t WHERE t.target_class IN (:class_list)"), [], $aTriggerParams);
|
||||
|
||||
@@ -67,6 +67,7 @@ class AttributeBlobEventListener implements iEventServiceSetup
|
||||
'file->file_name' => $oDocument->GetFileName(),
|
||||
'file->downloads_count' => $oDocument->GetDownloadsCount(),
|
||||
'file->data' => $oDocument->GetData(),
|
||||
'file->data_as_base64' => base64_encode($oDocument->GetData()),
|
||||
);
|
||||
$aTriggerParams = array('class_list' => MetaModel::EnumParentClasses(get_class($oObject), ENUM_PARENT_CLASSES_ALL));
|
||||
$oTriggerSet = new DBObjectSet(DBObjectSearch::FromOQL("SELECT $sTriggerClass AS t WHERE t.target_class IN (:class_list)"), array(), $aTriggerParams);
|
||||
|
||||
Reference in New Issue
Block a user