mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-11-23 22:09:29 +00:00
Added security check for comments.
This commit is contained in:
parent
ce593b5a5c
commit
72d9ef4dfa
@ -80,7 +80,11 @@ class postsController {
|
||||
$postID = getPostPostIDWithAccess("postID");
|
||||
|
||||
//Get informations about the post
|
||||
$postInfos = components()->posts->get_single($postID, true);
|
||||
$postInfos = components()->posts->get_single($postID, false);
|
||||
|
||||
//Check if we can get the comments of the post
|
||||
if(components()->user->allowComments($postInfos['user_page_id']))
|
||||
$postInfos['comments'] = components()->comments->get($postInfos["ID"]);
|
||||
|
||||
//Check for errors
|
||||
if(count($postInfos) == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user