From 770fa95eb7f612f0b349898fde77e295362a8d8c Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Mon, 16 Jul 2018 09:27:05 +0200 Subject: [PATCH] Prepare group posts implementation. --- classes/components/posts.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/components/posts.php b/classes/components/posts.php index 5166d75..f79d3a3 100644 --- a/classes/components/posts.php +++ b/classes/components/posts.php @@ -118,7 +118,7 @@ class Posts { $visibilityLevel = $this->getUserVisibility($userID, $targetID); //Prepare the request on the database - $conditions = "WHERE ID_personne = ? AND ("; + $conditions = "WHERE ID_personne = ? AND group_id = 0 AND ("; $dataConds = array($targetID); //Add the visibility level conditions @@ -188,7 +188,7 @@ class Posts { //Process the list of friends of the user foreach($friendsList as $friend){ $friendID = $friend->getFriendID(); - $conditions .= " OR ID_personne = ?"; + $conditions .= " OR (ID_personne = ? AND group_id = 0)"; $dataConds[] = $friendID; }