From b42d958a83991f019e516ca518afa0eb49db7578 Mon Sep 17 00:00:00 2001 From: Dmitry Tretyakov <76806170+tretdm@users.noreply.github.com> Date: Wed, 25 Oct 2023 16:35:27 +0700 Subject: [PATCH] Fix --- Web/Presenters/WallPresenter.php | 8 ++++---- Web/Presenters/templates/Admin/Logs.xml | 2 +- Web/Presenters/templates/Search/Index.xml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Web/Presenters/WallPresenter.php b/Web/Presenters/WallPresenter.php index 597347a1..f7928db8 100644 --- a/Web/Presenters/WallPresenter.php +++ b/Web/Presenters/WallPresenter.php @@ -74,7 +74,7 @@ final class WallPresenter extends OpenVKPresenter $this->template->paginatorConf = (object) [ "count" => $this->template->count, "page" => (int) ($_GET["p"] ?? 1), - "amount" => $this->template->posts->count(), + "amount" => $this->template->posts->getRowCount(), "perPage" => OPENVK_DEFAULT_PER_PAGE, ]; @@ -152,9 +152,9 @@ final class WallPresenter extends OpenVKPresenter ->where("deleted", 0) ->order("created DESC"); $this->template->paginatorConf = (object) [ - "count" => $posts->count(), + "count" => $posts->getRowCount(), "page" => (int) ($_GET["p"] ?? 1), - "amount" => $posts->page((int) ($_GET["p"] ?? 1), $perPage)->count(), + "amount" => $posts->page((int) ($_GET["p"] ?? 1), $perPage)->getRowCount(), "perPage" => $perPage, ]; $this->template->posts = []; @@ -182,7 +182,7 @@ final class WallPresenter extends OpenVKPresenter $this->template->paginatorConf = (object) [ "count" => $count, "page" => (int) ($_GET["p"] ?? 1), - "amount" => $posts->count(), + "amount" => $posts->getRowCount(), "perPage" => $pPage, ]; foreach($posts as $post) diff --git a/Web/Presenters/templates/Admin/Logs.xml b/Web/Presenters/templates/Admin/Logs.xml index a6141d02..8b279008 100644 --- a/Web/Presenters/templates/Admin/Logs.xml +++ b/Web/Presenters/templates/Admin/Logs.xml @@ -9,7 +9,7 @@ {/block} {block content} - {var $amount = $logs->count()} + {var $amount = $logs->getRowCount()}