]> git.mxchange.org Git - friendica.git/commitdiff
Fix variable name
authorArt4 <art4@wlabs.de>
Mon, 4 Nov 2024 15:28:10 +0000 (15:28 +0000)
committerArt4 <art4@wlabs.de>
Mon, 4 Nov 2024 15:28:10 +0000 (15:28 +0000)
The variable was renamed but this line was accidently overseen

see https://github.com/friendica/friendica/commit/62eb16e9ad9adbd2fa712cccbb40ab53b8b16e5b#diff-785d24b46fdf749363656f33208f941ea0eca809c7c76452180a0bfc16df68a3R2555

src/Model/Item.php

index 06f824e6fee91bdf3e664b9784ef23e3e895fe5f..0a000f8c1eeb32d32abb748c00e9dcac59119f89 100644 (file)
@@ -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 = '';