Groups: Return pagination to subscribers list

This commit is contained in:
Maxim Leshchenko 2021-11-13 23:39:00 +02:00 committed by GitHub
parent 7c81378b6c
commit 2c31900d97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -83,13 +83,6 @@ final class GroupPresenter extends OpenVKPresenter
{ {
$this->assertUserLoggedIn(); $this->assertUserLoggedIn();
$this->template->paginatorConf = (object) [
"count" => $this->template->count,
"page" => $this->queryParam("p") ?? 1,
"amount" => NULL,
"perPage" => OPENVK_DEFAULT_PER_PAGE,
];
$this->template->club = $this->clubs->get($id); $this->template->club = $this->clubs->get($id);
$this->template->onlyShowManagers = $this->queryParam("onlyAdmins") == "1"; $this->template->onlyShowManagers = $this->queryParam("onlyAdmins") == "1";
if($this->template->onlyShowManagers) { if($this->template->onlyShowManagers) {
@ -101,14 +94,20 @@ final class GroupPresenter extends OpenVKPresenter
} }
$this->template->count = $this->template->club->getManagersCount(); $this->template->count = $this->template->club->getManagersCount();
return; } else {
}
$this->template->followers = $this->template->club->getFollowers((int) ($this->queryParam("p") ?? 1)); $this->template->followers = $this->template->club->getFollowers((int) ($this->queryParam("p") ?? 1));
$this->template->managers = null; $this->template->managers = null;
$this->template->count = $this->template->club->getFollowersCount(); $this->template->count = $this->template->club->getFollowersCount();
} }
$this->template->paginatorConf = (object) [
"count" => $this->template->count,
"page" => $this->queryParam("p") ?? 1,
"amount" => NULL,
"perPage" => OPENVK_DEFAULT_PER_PAGE,
];
}
function renderModifyAdmin(int $id): void function renderModifyAdmin(int $id): void
{ {
$user = is_null($this->queryParam("user")) ? $this->postParam("user") : $this->queryParam("user"); $user = is_null($this->queryParam("user")) ? $this->postParam("user") : $this->queryParam("user");