From 65a11779e586749bc0d84161443df9a835a499d2 Mon Sep 17 00:00:00 2001 From: Jim Safley Date: Fri, 1 Dec 2023 14:12:13 -0500 Subject: [PATCH] Remove sort_by from pagination links if sort_by_default is set --- application/src/View/Helper/Pagination.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/application/src/View/Helper/Pagination.php b/application/src/View/Helper/Pagination.php index 56753f1ff..1f06e6953 100644 --- a/application/src/View/Helper/Pagination.php +++ b/application/src/View/Helper/Pagination.php @@ -128,6 +128,9 @@ protected function getUrl($page) { $query = $this->getView()->params()->fromQuery(); $query['page'] = (int) $page; + if (isset($query['sort_by_default'])) { + unset($query['sort_by']); + } unset($query['sort_by_default']); $options = ['query' => $query]; if (is_string($this->fragment)) {