diff --git a/modules/comment/comment.controller.php b/modules/comment/comment.controller.php index 59117d702..27c243016 100644 --- a/modules/comment/comment.controller.php +++ b/modules/comment/comment.controller.php @@ -1365,6 +1365,14 @@ class CommentController extends Comment } } + // Call trigger (before). + $trigger_output = ModuleHandler::triggerCall('comment.moveCommentToTrash', 'before', $obj); + if (!$trigger_output->toBool()) + { + return $trigger_output; + } + + // Create trash object. require_once(RX_BASEDIR.'modules/trash/model/TrashVO.php'); $oTrashVO = new TrashVO(); $oTrashVO->setTrashSrl(getNextSequence()); diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index ad96d828d..caf03fbfb 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -1385,6 +1385,13 @@ class DocumentController extends Document return new BaseObject(-1, 'Cannot throw data from the trash to the trash'); } + // Call trigger (before). + $trigger_output = ModuleHandler::triggerCall('document.moveDocumentToTrash', 'before', $obj); + if (!$trigger_output->toBool()) + { + return $trigger_output; + } + // Create trash object. require_once(RX_BASEDIR.'modules/trash/model/TrashVO.php'); $oTrashVO = new TrashVO();