Skip to content

Commit

Permalink
Fixed some limit lookups
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCartpenter committed Jun 24, 2024
1 parent 5b88439 commit 32d9bf9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions upload/catalog/controller/product/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ public function index(): void {
$page = 1;
}

if (isset($this->request->get['limit']) && (int)$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');
$limit = (int)$this->config->get('theme_' . $this->config->get('config_theme') . '_product_limit');
}

$data['breadcrumbs'] = [];
Expand Down
2 changes: 1 addition & 1 deletion upload/catalog/controller/product/manufacturer.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function info(): void {
$page = 1;
}

if (isset($this->request->get['limit']) && (int)$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');
Expand Down
4 changes: 2 additions & 2 deletions upload/catalog/controller/product/search.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ public function index(): void {
$page = 1;
}

if (isset($this->request->get['limit']) && (int)$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');
$limit = (int)$this->config->get('theme_' . $this->config->get('config_theme') . '_product_limit');
}

if (isset($this->request->get['search'])) {
Expand Down
4 changes: 2 additions & 2 deletions upload/catalog/controller/product/special.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ public function index(): void {
$page = 1;
}

if (isset($this->request->get['limit']) && (int)$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');
$limit = (int)$this->config->get('theme_' . $this->config->get('config_theme') . '_product_limit');
}

$this->document->setTitle($this->language->get('heading_title'));
Expand Down

0 comments on commit 32d9bf9

Please sign in to comment.