diff --git a/Web/Presenters/WallPresenter.php b/Web/Presenters/WallPresenter.php index 87b9281b..998e4f4d 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" => sizeof((array)$this->template->posts), + "amount" => $this->template->posts->count(), "perPage" => OPENVK_DEFAULT_PER_PAGE, ]; @@ -332,7 +332,7 @@ final class WallPresenter extends OpenVKPresenter foreach($photos as $photo) $post->attach($photo); - if(sizeof($videos) > 0) + if($videos->count() > 0) foreach($videos as $vid) $post->attach($vid); diff --git a/Web/Presenters/templates/Admin/Logs.xml b/Web/Presenters/templates/Admin/Logs.xml index c89b99df..a6141d02 100644 --- a/Web/Presenters/templates/Admin/Logs.xml +++ b/Web/Presenters/templates/Admin/Logs.xml @@ -9,7 +9,7 @@ {/block} {block content} - {var $amount = sizeof((array)$logs)} + {var $amount = $logs->count()}