From 28f2b7fc81a7335ebecb8a82c231d5058aac699f Mon Sep 17 00:00:00 2001 From: Art4 Date: Mon, 4 Nov 2024 15:28:10 +0000 Subject: [PATCH] Fix variable name The variable was renamed but this line was accidently overseen see https://github.com/friendica/friendica/commit/62eb16e9ad9adbd2fa712cccbb40ab53b8b16e5b#diff-785d24b46fdf749363656f33208f941ea0eca809c7c76452180a0bfc16df68a3R2555 --- 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 06f824e6fe..0a000f8c1e 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -3198,10 +3198,10 @@ class Item } elseif ($remote_user) { // Authenticated visitor - fetch the matching permissionsets $permissionSets = DI::permissionSet()->selectByContactId($remote_user, $owner_id); - if (!empty($set)) { + if (!empty($permissionSets)) { $condition = [ "(`private` != ? OR (`private` = ? AND `wall` - AND `psid` IN (" . implode(', ', array_fill(0, count($set), '?')) . ")))", + AND `psid` IN (" . implode(', ', array_fill(0, count($permissionSets), '?')) . ")))", self::PRIVATE, self::PRIVATE ]; $condition = array_merge($condition, $permissionSets->column('id')); @@ -3247,7 +3247,7 @@ class Item */ $permissionSets = DI::permissionSet()->selectByContactId($remote_user, $owner_id); - if (!empty($set)) { + if (!empty($permissionSets)) { $sql_set = sprintf(" OR (" . $table . "`private` = %d AND " . $table . "`wall` AND " . $table . "`psid` IN (", self::PRIVATE) . implode(',', $permissionSets->column('id')) . "))"; } else { $sql_set = ''; -- 2.39.5