]> git.mxchange.org Git - friendica.git/commitdiff
Issue 11310: Show pinned posts when not logged in
authorMichael <heluecht@pirati.ca>
Mon, 21 Mar 2022 22:58:23 +0000 (22:58 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 21 Mar 2022 22:58:23 +0000 (22:58 +0000)
src/Content/Conversation.php
src/Module/Profile/Status.php

index e441e8ba4b3b7cae3e9fcf317c5887cb3e09dfcc..48265ce5138ebdb9b2d8bd353a6503888527a2af 100644 (file)
@@ -454,7 +454,7 @@ class Conversation
                                        . "'; </script>\r\n";
                        }
                } elseif ($mode === 'profile') {
-                       $items = $this->addChildren($items, false, $order, local_user());
+                       $items = $this->addChildren($items, false, $order, $uid);
 
                        if (!$update) {
                                $tab = !empty($_GET['tab']) ? trim($_GET['tab']) : 'posts';
@@ -929,7 +929,7 @@ class Conversation
                $condition = DBA::mergeConditions($condition,
                        ["`uid` IN (0, ?) AND (`vid` != ? OR `vid` IS NULL)", $uid, Verb::getID(Activity::FOLLOW)]);
 
-               $thread_items = Post::selectForUser(local_user(), array_merge(ItemModel::DISPLAY_FIELDLIST, ['pinned', 'contact-uid', 'gravity', 'post-type', 'post-reason']), $condition, $params);
+               $thread_items = Post::selectForUser($uid, array_merge(ItemModel::DISPLAY_FIELDLIST, ['pinned', 'contact-uid', 'gravity', 'post-type', 'post-reason']), $condition, $params);
 
                $items = [];
 
index bb4537d6cc99631ee9f305ef505fb612ae282d9c..891926799076a649afbf8ce040c5d1295c8df04b 100644 (file)
@@ -218,7 +218,7 @@ class Status extends BaseProfile
                        } elseif ($profile['uid'] == local_user()) {
                                $condition = [];
                        }
-       
+
                        $pinned_items = Post::selectPinned($profile['uid'], ['uri-id', 'pinned'], $condition);
                        $pinned = Post::toArray($pinned_items);
                        $items = array_merge($items, $pinned);