]> git.mxchange.org Git - friendica.git/commitdiff
Indention, documentation
authorMichael <heluecht@pirati.ca>
Tue, 3 Nov 2020 20:30:59 +0000 (20:30 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 3 Nov 2020 20:30:59 +0000 (20:30 +0000)
include/conversation.php
src/Model/Item.php

index 40ed2259764cce6d50a58cd75534f74d4a60f3ef..cfe500b876e15ecdd0133de9bc042b7041fffe46 100644 (file)
@@ -833,7 +833,7 @@ function conversation_add_children(array $parents, $block_authors, $order, $uid)
                        $condition = ["`item`.`parent-uri` = ? AND `item`.`uid` IN (0, ?) AND (`vid` != ? OR `vid` IS NULL)",
                                $parent['uri'], $uid, Verb::getID(Activity::FOLLOW)];
                        $causer = 0;
-                       }
+               }
                $items = conversation_fetch_items($parent, $items, $condition, $block_authors, $params, $causer);
        }
 
@@ -851,12 +851,12 @@ function conversation_add_children(array $parents, $block_authors, $order, $uid)
 /**
  * Fetch conversation items
  *
- * @param array $parent
- * @param array $items
- * @param array $condition
- * @param boolean $block_authors
- * @param array $params
- * @param integer $causer
+ * @param array   $parent        Parent Item array
+ * @param array   $items         Item array
+ * @param array   $condition     SQL condition
+ * @param boolean $block_authors Don't show posts from contacts that are hidden (used on the community page)
+ * @param array   $params        SQL parameters
+ * @param integer $causer        Contact ID of the resharer
  * @return array
  */
 function conversation_fetch_items(array $parent, array $items, array $condition, bool $block_authors, array $params, int $causer) {
index 216172c92115213dee5e7c7403e2207c5427c056..088f783d6ac61404bb2ffb6574fbc87163170f1a 100644 (file)
@@ -3421,7 +3421,8 @@ class Item
                         // Authenticated visitor - fetch the matching permissionsets
                        $set = PermissionSet::get($owner_id, $remote_user);
                        if (!empty($set)) {
-                               $condition = ["(`private` != ? OR (`private` = ? AND `wall` AND `psid` IN (?" . str_repeat(",?", count($set) - 1) . ")))",
+                               $condition = ["(`private` != ? OR (`private` = ? AND `wall`
+                                       AND `psid` IN (" . implode(', ', array_fill(0, count($set), '?')) . ")))",
                                        Item::PRIVATE, Item::PRIVATE];
                                $condition = array_merge($condition, $set);
                        }