From 09f4d4b5a5b25b724ec18f59d849b9a0c3d54b8b Mon Sep 17 00:00:00 2001 From: mhcwebdesign Date: Mon, 24 Jun 2024 12:03:54 +0100 Subject: [PATCH] pagination limit fixes Improved pagination limit verifications --- upload/catalog/controller/product/category.php | 2 +- upload/catalog/controller/product/manufacturer.php | 2 +- upload/catalog/controller/product/search.php | 2 +- upload/catalog/controller/product/special.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/upload/catalog/controller/product/category.php b/upload/catalog/controller/product/category.php index 6c3db3bae79..ea7f48128fa 100644 --- a/upload/catalog/controller/product/category.php +++ b/upload/catalog/controller/product/category.php @@ -33,7 +33,7 @@ public function index() { $page = 1; } - if (isset($this->request->get['limit'])) { + if (isset($this->request->get['limit']) && (int)$this->request->get['limit'] > 0) { $limit = (int)$this->request->get['limit']; } else { $limit = $this->config->get('theme_' . $this->config->get('config_theme') . '_product_limit'); diff --git a/upload/catalog/controller/product/manufacturer.php b/upload/catalog/controller/product/manufacturer.php index 3568f78fc3f..0e92dc8819f 100644 --- a/upload/catalog/controller/product/manufacturer.php +++ b/upload/catalog/controller/product/manufacturer.php @@ -85,7 +85,7 @@ public function info() { $page = 1; } - if (isset($this->request->get['limit'])) { + if (isset($this->request->get['limit']) && (int)$this->request->get['limit'] > 0) { $limit = (int)$this->request->get['limit']; } else { $limit = (int)$this->config->get('theme_' . $this->config->get('config_theme') . '_product_limit'); diff --git a/upload/catalog/controller/product/search.php b/upload/catalog/controller/product/search.php index 5bf68d148e8..dea6c60d3f1 100644 --- a/upload/catalog/controller/product/search.php +++ b/upload/catalog/controller/product/search.php @@ -59,7 +59,7 @@ public function index() { $page = 1; } - if (isset($this->request->get['limit'])) { + if (isset($this->request->get['limit']) && (int)$this->request->get['limit'] > 0) { $limit = (int)$this->request->get['limit']; } else { $limit = $this->config->get('theme_' . $this->config->get('config_theme') . '_product_limit'); diff --git a/upload/catalog/controller/product/special.php b/upload/catalog/controller/product/special.php index dc01f4b2da7..592a3f640a9 100644 --- a/upload/catalog/controller/product/special.php +++ b/upload/catalog/controller/product/special.php @@ -25,7 +25,7 @@ public function index() { $page = 1; } - if (isset($this->request->get['limit'])) { + if (isset($this->request->get['limit']) && (int)$this->request->get['limit'] > 0) { $limit = (int)$this->request->get['limit']; } else { $limit = $this->config->get('theme_' . $this->config->get('config_theme') . '_product_limit');