Fix 2056 add trigger before moving document/comment to trash

This commit is contained in:
Kijin Sung 2023-09-22 02:07:53 +09:00
parent 565cfad15f
commit 33b2c79891
2 changed files with 15 additions and 0 deletions

View file

@ -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());