diff --git a/classes/components/comments.php b/classes/components/comments.php index 9e931e6..b603110 100644 --- a/classes/components/comments.php +++ b/classes/components/comments.php @@ -51,6 +51,18 @@ class Comments { } + /** + * Check if a comment exists or not + * + * @param int $commentID The ID of the comment to check + * @return bool + */ + public function exists(int $commentID) : bool { + + return CS::get()->db->count($this::COMMENTS_TABLE, "WHERE ID = ?", array($commentID)) > 0; + + } + /** * Parse a comment informations *