mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
Add option to limit the maximum thread depth of comments
This commit is contained in:
parent
81d9f46098
commit
a4e9eb4a00
8 changed files with 60 additions and 0 deletions
|
|
@ -246,6 +246,18 @@ class CommentModel extends Comment
|
|||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get comment depth.
|
||||
*
|
||||
* @param int $comment_srl
|
||||
* @return ?int
|
||||
*/
|
||||
public static function getCommentDepth(int $comment_srl): ?int
|
||||
{
|
||||
$output = executeQuery('comment.getCommentDepth', ['comment_srl' => $comment_srl]);
|
||||
return isset($output->data->depth) ? (int)$output->data->depth : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the total number of comments in corresponding with document_srl.
|
||||
* @param int $document_srl
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue