Add new trigger points in comment.copyCommentByDocument to replace old, nonstandard "add" name

This commit is contained in:
Kijin Sung 2023-10-02 22:19:19 +09:00
parent 6e913fcb3a
commit 79808ee285

View file

@ -2153,10 +2153,12 @@ class CommentController extends Comment
$args->source = $comment;
$args->copied = $copy;
ModuleHandler::triggerCall('comment.copyCommentByDocument', 'add', $args);
ModuleHandler::triggerCall('comment.copyCommentByDocument.each', 'before', $args);
// insert a copied comment
$this->insertComment($copy, true);
ModuleHandler::triggerCall('comment.copyCommentByDocument.each', 'after', $args);
$copied_comments[$comment->comment_srl] = $copy->comment_srl;
}