Check if a commen exists

This commit is contained in:
Pierre 2018-01-24 06:39:37 +01:00
parent c19ab3d587
commit 2c4e84a7db

View File

@ -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
*