From 8c2ba7fd317c63d5d67886191bc7378a2d6d9d89 Mon Sep 17 00:00:00 2001 From: Pierre Date: Sun, 13 May 2018 17:51:13 +0200 Subject: [PATCH] Can get comments with all user posts --- classes/components/posts.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/classes/components/posts.php b/classes/components/posts.php index 417a0ac..12ae231 100644 --- a/classes/components/posts.php +++ b/classes/components/posts.php @@ -234,9 +234,11 @@ class Posts { * any kind of limit * * @param int $userID The ID of the target user + * @param bool $load_comments Specify whether the comments should be also loaded + * or not (default: FALSE) * @return array The list of posts */ - public function getUserEntirePostsList(int $userID) : array { + public function getUserEntirePostsList(int $userID, bool $load_comments = FALSE) : array { //Prepare database request $conditions = "WHERE ID_personne = ? OR ID_amis = ?"; @@ -250,7 +252,7 @@ class Posts { ); //Parse and return posts (do not load comments) - return $this->processGetMultiple($list, FALSE); + return $this->processGetMultiple($list, $load_comments); }