From e775be38c8b478a48fb51da93c340644bbde85d7 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 16 Jan 2021 23:24:48 +0000 Subject: [PATCH] Fix failed query --- src/Model/Item.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index 02695fae7..f9a27b196 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -3470,7 +3470,7 @@ class Item * * default permissions - anonymous user */ - $sql = sprintf(" AND `item`.`private` != %d", self::PRIVATE); + $sql = sprintf(" AND `private` != %d", self::PRIVATE); // Profile owner - everything is visible if ($local_user && ($local_user == $owner_id)) { @@ -3486,12 +3486,12 @@ class Item $set = PermissionSet::get($owner_id, $remote_user); if (!empty($set)) { - $sql_set = sprintf(" OR (`item`.`private` = %d AND `item`.`wall` AND `item`.`psid` IN (", self::PRIVATE) . implode(',', $set) . "))"; + $sql_set = sprintf(" OR (`private` = %d AND `wall` AND `psid` IN (", self::PRIVATE) . implode(',', $set) . "))"; } else { $sql_set = ''; } - $sql = sprintf(" AND (`item`.`private` != %d", self::PRIVATE) . $sql_set . ")"; + $sql = sprintf(" AND (`private` != %d", self::PRIVATE) . $sql_set . ")"; } return $sql;