Re-enable pinned items in profile wall
This commit is contained in:
parent
46c4bfe580
commit
e5ab4f1889
|
@ -791,7 +791,7 @@ function conversation(App $a, array $items, Pager $pager, $mode, $update, $previ
|
||||||
/**
|
/**
|
||||||
* Fetch all comments from a query. Additionally set the newest resharer as thread owner.
|
* Fetch all comments from a query. Additionally set the newest resharer as thread owner.
|
||||||
*
|
*
|
||||||
* @param array $thread_items Database statement with thread posts
|
* @param mixed $thread_items Database statement with thread posts
|
||||||
* @param boolean $pinned Is the item pinned?
|
* @param boolean $pinned Is the item pinned?
|
||||||
*
|
*
|
||||||
* @return array items with parents and comments
|
* @return array items with parents and comments
|
||||||
|
|
|
@ -206,7 +206,13 @@ class Status extends BaseProfile
|
||||||
|
|
||||||
$items = DBA::toArray($items_stmt);
|
$items = DBA::toArray($items_stmt);
|
||||||
|
|
||||||
$o .= conversation($a, $items, $pager, 'profile', false, false, 'received', $a->profile['uid']);
|
if ($pager->getStart() == 0 && !empty($a->profile['uid'])) {
|
||||||
|
$pinned_items = Item::selectPinned($a->profile['uid'], ['uri', 'pinned']);
|
||||||
|
$pinned = Item::inArray($pinned_items);
|
||||||
|
$items = array_merge($items, $pinned);
|
||||||
|
}
|
||||||
|
|
||||||
|
$o .= conversation($a, $items, $pager, 'profile', false, false, 'pinned_received', $a->profile['uid']);
|
||||||
|
|
||||||
$o .= $pager->renderMinimal(count($items));
|
$o .= $pager->renderMinimal(count($items));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue