diff --git a/Web/Models/Entities/User.php b/Web/Models/Entities/User.php index d132e015..215c7cba 100644 --- a/Web/Models/Entities/User.php +++ b/Web/Models/Entities/User.php @@ -1113,6 +1113,11 @@ class User extends RowModel return true; } + function getPaginatorType() + { + return $this->getRecord()->paginator_type; + } + function toVkApiStruct(): object { $res = (object) []; diff --git a/Web/Presenters/PhotosPresenter.php b/Web/Presenters/PhotosPresenter.php index 345b2c60..5aea8a7e 100644 --- a/Web/Presenters/PhotosPresenter.php +++ b/Web/Presenters/PhotosPresenter.php @@ -27,7 +27,7 @@ final class PhotosPresenter extends OpenVKPresenter if(!$user) $this->notFound(); if (!$user->getPrivacyPermission('photos.read', $this->user->identity ?? NULL)) $this->flashFail("err", tr("forbidden"), tr("forbidden_comment")); - $this->template->albums = $this->albums->getUserAlbums($user, $this->queryParam("p") ?? 1); + $this->template->albums = $this->albums->getUserAlbums($user, (int)($this->queryParam("p") ?? 1)); $this->template->count = $this->albums->getUserAlbumsCount($user); $this->template->owner = $user; $this->template->canEdit = false; @@ -36,7 +36,7 @@ final class PhotosPresenter extends OpenVKPresenter } else { $club = (new Clubs)->get(abs($owner)); if(!$club) $this->notFound(); - $this->template->albums = $this->albums->getClubAlbums($club, $this->queryParam("p") ?? 1); + $this->template->albums = $this->albums->getClubAlbums($club, (int)($this->queryParam("p") ?? 1)); $this->template->count = $this->albums->getClubAlbumsCount($club); $this->template->owner = $club; $this->template->canEdit = false; diff --git a/Web/Presenters/UserPresenter.php b/Web/Presenters/UserPresenter.php index 9cfa3654..ada4652a 100644 --- a/Web/Presenters/UserPresenter.php +++ b/Web/Presenters/UserPresenter.php @@ -471,6 +471,9 @@ final class UserPresenter extends OpenVKPresenter if(in_array($this->postParam("main_page"), [0, 1])) $user->setMain_Page((int) $this->postParam("main_page")); + + if(in_array($this->postParam("paginator"), [0, 1])) + $user->setPaginator_type((int) $this->postParam("paginator")); } else if($_GET['act'] === "lMenu") { $settings = [ "menu_bildoj" => "photos", diff --git a/Web/Presenters/templates/@listView.xml b/Web/Presenters/templates/@listView.xml index 34739b59..decd1cd0 100644 --- a/Web/Presenters/templates/@listView.xml +++ b/Web/Presenters/templates/@listView.xml @@ -15,11 +15,11 @@ {ifset specpage} {include specpage, x => $dat} {else} -