mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Add triggers before and after getCommentList()
예전에 getDocumentList() 전후에 트리거를 추가한 것처럼 댓글 목록에서도 트리거를 사용하여 검색 조건을 바꾸거나 결과를 조정할 수 있도록 함.
This commit is contained in:
parent
509b403eff
commit
877863854e
1 changed files with 14 additions and 0 deletions
|
|
@ -512,6 +512,13 @@ class commentModel extends comment
|
|||
$args->status = 1;
|
||||
}
|
||||
|
||||
// call trigger (before)
|
||||
$trigger_output = ModuleHandler::triggerCall('comment.getCommentList', 'before', $args);
|
||||
if($trigger_output instanceof Object && !$trigger_output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
|
||||
$output = executeQueryArray('comment.getCommentPageList', $args);
|
||||
|
||||
// return if an error occurs in the query results
|
||||
|
|
@ -531,6 +538,13 @@ class commentModel extends comment
|
|||
}
|
||||
}
|
||||
|
||||
// call trigger (after)
|
||||
$trigger_output = ModuleHandler::triggerCall('comment.getCommentList', 'after', $output);
|
||||
if($trigger_output instanceof Object && !$trigger_output->toBool())
|
||||
{
|
||||
return $trigger_output;
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue