The new function is now used here as well.
This commit is contained in:
parent
8375d4ac4c
commit
4d4cce4867
1 changed files with 8 additions and 8 deletions
|
@ -1055,22 +1055,22 @@ class Contact extends BaseObject
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_array($r[0]["network"], [NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, ""])) {
|
if (in_array($r[0]["network"], [NETWORK_DFRN, NETWORK_DIASPORA, NETWORK_OSTATUS, ""])) {
|
||||||
$sql = "(`item`.`uid` = 0 OR (`item`.`uid` = %d AND NOT `item`.`global`))";
|
$sql = "(`item`.`uid` = 0 OR (`item`.`uid` = ? AND NOT `item`.`global`))";
|
||||||
} else {
|
} else {
|
||||||
$sql = "`item`.`uid` = %d";
|
$sql = "`item`.`uid` = ?";
|
||||||
}
|
}
|
||||||
|
|
||||||
$author_id = intval($r[0]["author-id"]);
|
$author_id = intval($r[0]["author-id"]);
|
||||||
|
|
||||||
$contact = ($r[0]["contact-type"] == ACCOUNT_TYPE_COMMUNITY ? 'owner-id' : 'author-id');
|
$contact = ($r[0]["contact-type"] == ACCOUNT_TYPE_COMMUNITY ? 'owner-id' : 'author-id');
|
||||||
|
|
||||||
$r = q(item_query(local_user()) . " AND `item`.`" . $contact . "` = %d AND " . $sql .
|
$condition = ["`$contact` = ? AND `verb` = ? AND " . $sql,
|
||||||
" AND `item`.`verb` = '%s' ORDER BY `item`.`created` DESC LIMIT %d, %d",
|
$author_id, ACTIVITY_POST, local_user()];
|
||||||
intval($author_id), intval(local_user()), dbesc(ACTIVITY_POST),
|
$params = ['order' => ['created' => true],
|
||||||
intval($a->pager['start']), intval($a->pager['itemspage'])
|
'limit' => [$a->pager['start'], $a->pager['itemspage']]];
|
||||||
);
|
$r = Item::select(local_user(), [], $condition, $params);
|
||||||
|
|
||||||
$o = conversation($a, $r, 'contact-posts', false);
|
$o = conversation($a, dba::inArray($r), 'contact-posts', false);
|
||||||
|
|
||||||
$o .= alt_pager($a, count($r));
|
$o .= alt_pager($a, count($r));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue