Pinned posts now work for visitors in the intended way

This commit is contained in:
Michael 2019-11-08 06:52:44 +00:00
parent 2200996d44
commit fc94cad5f2
4 changed files with 34 additions and 10 deletions

View file

@ -350,7 +350,7 @@ class Profile extends BaseModule
$items = DBA::toArray($items_stmt);
if ($pager->getStart() == 0 && !empty($a->profile['profile_uid'])) {
$pinned_items = Item::selectPinned($a->profile['profile_uid'], ['uri']);
$pinned_items = Item::selectPinned($a->profile['profile_uid'], ['uri', 'pinned'], ['true' . $sql_extra]);
$pinned = Item::inArray($pinned_items);
$items = array_merge($items, $pinned);
}