Merge remote-tracking branch 'upstream/2022.05-rc' into bulk-delivery
This commit is contained in:
commit
065d73f860
|
@ -334,12 +334,13 @@ class Transmitter
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($page)) {
|
if (empty($page)) {
|
||||||
$data['first'] = DI::baseUrl() . '/featured/' . $owner['nickname'] . '?page=1';
|
$items = Post::select(['id'], $condition, ['limit' => 20, 'order' => ['created' => true]]);
|
||||||
} else {
|
} else {
|
||||||
$data['type'] = 'OrderedCollectionPage';
|
$data['type'] = 'OrderedCollectionPage';
|
||||||
|
$items = Post::select(['id'], $condition, ['limit' => [($page - 1) * 20, 20], 'order' => ['created' => true]]);
|
||||||
|
}
|
||||||
$list = [];
|
$list = [];
|
||||||
|
|
||||||
$items = Post::select(['id'], $condition, ['limit' => [($page - 1) * 20, 20], 'order' => ['created' => true]]);
|
|
||||||
while ($item = Post::fetch($items)) {
|
while ($item = Post::fetch($items)) {
|
||||||
$activity = self::createActivityFromItem($item['id'], true);
|
$activity = self::createActivityFromItem($item['id'], true);
|
||||||
$activity['type'] = $activity['type'] == 'Update' ? 'Create' : $activity['type'];
|
$activity['type'] = $activity['type'] == 'Update' ? 'Create' : $activity['type'];
|
||||||
|
@ -355,10 +356,11 @@ class Transmitter
|
||||||
$data['next'] = DI::baseUrl() . '/featured/' . $owner['nickname'] . '?page=' . ($page + 1);
|
$data['next'] = DI::baseUrl() . '/featured/' . $owner['nickname'] . '?page=' . ($page + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!empty($page)) {
|
||||||
$data['partOf'] = DI::baseUrl() . '/featured/' . $owner['nickname'];
|
$data['partOf'] = DI::baseUrl() . '/featured/' . $owner['nickname'];
|
||||||
|
}
|
||||||
|
|
||||||
$data['orderedItems'] = $list;
|
$data['orderedItems'] = $list;
|
||||||
}
|
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user