From b22cbbe1a56438b034fc5d605b5c3db54a5934a4 Mon Sep 17 00:00:00 2001 From: Kevin Ditscheid <kevin.ditscheid@sgalinski.de> Date: Fri, 21 Oct 2022 09:10:18 +0200 Subject: [PATCH] [TASK] Release version 5.2.1 --- Classes/Pagination/Pagination.php | 8 +++----- composer.json | 2 +- ext_emconf.php | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Classes/Pagination/Pagination.php b/Classes/Pagination/Pagination.php index f6c2c7e4..c69fceef 100644 --- a/Classes/Pagination/Pagination.php +++ b/Classes/Pagination/Pagination.php @@ -86,7 +86,7 @@ class Pagination { public function initialize() { $this->firstPage = 1; $this->totalItems = $this->fetchTotalItemCount(); - $this->lastPage = ceil($this->totalItems / $this->limit); + $this->lastPage = (int) ceil($this->totalItems / $this->limit); // correct current page if out of bounds $this->currentPage = $this->currentPage < 1 ? 1 : min($this->currentPage, $this->lastPage); $this->nextPage = $this->currentPage >= $this->lastPage ? $this->lastPage : $this->currentPage + 1; @@ -110,8 +110,7 @@ class Pagination { private function fetchTotalItemCount(): int { $query = clone $this->queryResult->getQuery(); $query->setOffset(0)->setLimit(9999999); - $count = $query->execute()->count(); - return $count ?? 0; + return $query->execute()->count(); } /** @@ -124,8 +123,7 @@ class Pagination { private function fetchItems(): array { $query = clone $this->queryResult->getQuery(); $query->setOffset($this->startItem - 1)->setLimit($this->limit); - $items = $query->execute(TRUE); - return $items ?? []; + return $query->execute(TRUE); } /** diff --git a/composer.json b/composer.json index 25be3668..31aef706 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "license": [ "GPL-2.0-or-later" ], - "version": "5.2.0", + "version": "5.2.1", "support": { "issues": "https://gitlab.sgalinski.de/typo3/sg_jobs" }, diff --git a/ext_emconf.php b/ext_emconf.php index 559dad9f..c3944893 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -4,7 +4,7 @@ $EM_CONF['sg_jobs'] = [ 'title' => 'Jobs', 'description' => 'Manage and display your Job offers.', 'category' => 'plugin', - 'version' => '5.2.0', + 'version' => '5.2.1', 'state' => 'stable', 'uploadfolder' => FALSE, 'createDirs' => '', -- GitLab