mirror of
https://github.com/openvk/openvk
synced 2024-12-22 16:42:32 +03:00
Restrict maximum posts per page to 50 in global and local feed
This commit is contained in:
parent
e50aa27eeb
commit
65e4c163cb
1 changed files with 2 additions and 2 deletions
|
@ -86,7 +86,7 @@ final class WallPresenter extends OpenVKPresenter
|
|||
}, iterator_to_array($subs));
|
||||
$ids[] = $this->user->id;
|
||||
|
||||
$perPage = (int) ($_GET["posts"] ?? OPENVK_DEFAULT_PER_PAGE);
|
||||
$perPage = min((int) ($_GET["posts"] ?? OPENVK_DEFAULT_PER_PAGE), 50);
|
||||
$posts = DatabaseConnection::i()
|
||||
->getContext()
|
||||
->table("posts")
|
||||
|
@ -110,7 +110,7 @@ final class WallPresenter extends OpenVKPresenter
|
|||
$this->assertUserLoggedIn();
|
||||
|
||||
$page = (int) ($_GET["p"] ?? 1);
|
||||
$pPage = (int) ($_GET["posts"] ?? OPENVK_DEFAULT_PER_PAGE);
|
||||
$pPage = min((int) ($_GET["posts"] ?? OPENVK_DEFAULT_PER_PAGE), 50);
|
||||
$posts = DatabaseConnection::i()
|
||||
->getContext()
|
||||
->table("posts")
|
||||
|
|
Loading…
Reference in a new issue