[CONFIG] Rename streams/notes_per_page to feeds/entries_per_page

这个提交包含在:
Hugo Sales 2022-01-02 20:21:00 +00:00 提交者 Diogo Peralta Cordeiro
父节点 ea5a4df1a4
当前提交 27276ba379
签署人:: diogo
GPG 密钥 ID: 18D2D35001FBFAB0
共有 3 个文件被更改,包括 5 次插入6 次删除

查看文件

@ -33,7 +33,6 @@ use Symfony\Component\HttpFoundation\Request;
class Directory extends CircleController
{
public const PER_PAGE = 32;
public const ALLOWED_FIELDS = ['nickname', 'created', 'modified', 'activity', 'subscribers'];
/**
@ -47,8 +46,8 @@ class Directory extends CircleController
}
$page = $this->int('page') ?? 1;
$limit = self::PER_PAGE;
$offset = self::PER_PAGE * ($page - 1);
$limit = Common::config('feeds', 'entries_per_page');
$offset = $limit * ($page - 1);
// -------- Figure out the order by field and operator --------
$order_by_qs = $this->string('order_by');

查看文件

@ -276,5 +276,5 @@ parameters:
discovery:
cors: true
streams:
notes_per_page: 32
feeds:
entries_per_page: 32

查看文件

@ -430,7 +430,7 @@ abstract class Cache
}
if (\is_null($per_page)) {
$per_page = Common::config('streams', 'notes_per_page');
$per_page = Common::config('feeds', 'entries_per_page');
}
$filter_scope = fn (Note|Actor $o) => $o->isVisibleTo($actor);