page < 0 is impossible now

This commit is contained in:
mathContao
2022-07-23 23:26:52 +02:00
parent 9f9f33c382
commit fdb920ee50

View File

@@ -371,7 +371,10 @@ 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));
if ($page < 1) {
$page = 1;
}
$this->view->logsPaginator = new Minz_Paginator($logs);
$this->view->logsPaginator->_nbItemsPerPage(50);
$this->view->logsPaginator->_currentPage($page);