mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-20 07:42:17 +02:00
Merge remote-tracking branch 'origin/support/3.1' into support/3.2
This commit is contained in:
@@ -1463,6 +1463,8 @@ class ObjectFormManager extends FormManager
|
||||
// Remove attachments that are no longer attached to the current object
|
||||
if (in_array($oAttachment->GetKey(), $aRemovedAttachmentsIds))
|
||||
{
|
||||
$aData = ['attachment' => $oAttachment];
|
||||
$this->oObject->FireEvent(EVENT_REMOVE_ATTACHMENT_FROM_OBJECT, $aData);
|
||||
$oAttachment->DBDelete();
|
||||
$aActions[] = self::GetAttachmentActionChangeOp($oAttachment, false);
|
||||
}
|
||||
@@ -1487,6 +1489,8 @@ class ObjectFormManager extends FormManager
|
||||
$oAttachment->Set('temp_id', '');
|
||||
$oAttachment->DBUpdate();
|
||||
$aActions[] = self::GetAttachmentActionChangeOp($oAttachment, true);
|
||||
$aData = ['attachment' => $oAttachment];
|
||||
$this->oObject->FireEvent(EVENT_ADD_ATTACHMENT_TO_OBJECT, $aData);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user