From a534fc79c48f3ef83cc54510d0a5bde2b5089ed6 Mon Sep 17 00:00:00 2001 From: maTh Date: Wed, 27 Jul 2022 18:52:30 +0200 Subject: Fix: logs page=0 error (#4460) * add docs of function param() * page < 0 is impossible now * show prev/next only, when there is a prev/next page * set always page params * Revert "page < 0 is impossible now" This reverts commit fdb920ee50efe2c5cf64ca2dec936ec28ab2ee6c. * Update logs_pagination.phtml --- app/Controllers/indexController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/Controllers/indexController.php') diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php index 70b8824c3..ad9a9a3ee 100755 --- a/app/Controllers/indexController.php +++ b/app/Controllers/indexController.php @@ -371,7 +371,7 @@ class FreshRSS_index_Controller extends FreshRSS_ActionController { $logs = FreshRSS_LogDAO::lines(); //TODO: ask only the necessary lines //gestion pagination - $page = Minz_Request::param('page', 1); + $page = intval(Minz_Request::param('page', 1)); $this->view->logsPaginator = new Minz_Paginator($logs); $this->view->logsPaginator->_nbItemsPerPage(50); $this->view->logsPaginator->_currentPage($page); -- cgit v1.2.3