diff --git a/plugins/Directory/Controller/Directory.php b/plugins/Directory/Controller/Directory.php index d0112b3f68..33da5ee504 100644 --- a/plugins/Directory/Controller/Directory.php +++ b/plugins/Directory/Controller/Directory.php @@ -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'); diff --git a/social.yaml b/social.yaml index 945c8d3de1..43dc65e436 100644 --- a/social.yaml +++ b/social.yaml @@ -276,5 +276,5 @@ parameters: discovery: cors: true - streams: - notes_per_page: 32 + feeds: + entries_per_page: 32 diff --git a/src/Core/Cache.php b/src/Core/Cache.php index f0f20f4169..bcbb48fc49 100644 --- a/src/Core/Cache.php +++ b/src/Core/Cache.php @@ -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);