mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-11-23 13:59:29 +00:00
Can get comments with all user posts
This commit is contained in:
parent
c95e2d7498
commit
8c2ba7fd31
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user