diff --git a/components/com_content/src/View/Archive/HtmlView.php b/components/com_content/src/View/Archive/HtmlView.php index b30110dd5067b..6580625b241bf 100644 --- a/components/com_content/src/View/Archive/HtmlView.php +++ b/components/com_content/src/View/Archive/HtmlView.php @@ -115,6 +115,7 @@ class HtmlView extends BaseHtmlView */ public function display($tpl = null) { + $app = Factory::getApplication(); $user = $this->getCurrentUser(); $state = $this->get('State'); $items = $this->get('Items'); @@ -219,6 +220,8 @@ public function display($tpl = null) $this->pagination = &$pagination; $this->pagination->setAdditionalUrlParam('month', $state->get('filter.month')); $this->pagination->setAdditionalUrlParam('year', $state->get('filter.year')); + $this->pagination->setAdditionalUrlParam('filter-search', $state->get('list.filter')); + $this->pagination->setAdditionalUrlParam('catid', $app->input->get('catid', [], 'array')); $this->_prepareDocument(); diff --git a/components/com_finder/src/View/Search/HtmlView.php b/components/com_finder/src/View/Search/HtmlView.php index eacf584afaf6a..90e454a411bf6 100644 --- a/components/com_finder/src/View/Search/HtmlView.php +++ b/components/com_finder/src/View/Search/HtmlView.php @@ -153,6 +153,28 @@ public function display($tpl = null) // Flag indicates to not add limitstart=0 to URL $this->pagination->hideEmptyLimitstart = true; + // Add additional parameters + $queryParameterList = [ + 'f' => 'int', + 't' => 'array', + 'q' => 'string', + 'l' => 'cmd', + 'd1' => 'string', + 'd2' => 'string', + 'w1' => 'string', + 'w2' => 'string', + ]; + + foreach ($queryParameterList as $parameter => $filter) { + $value = $app->input->get($parameter, null, $filter); + + if (is_null($value)) { + continue; + } + + $this->pagination->setAdditionalUrlParam($parameter, $value); + } + // Check for errors. if (count($errors = $this->get('Errors'))) { throw new GenericDataException(implode("\n", $errors), 500); diff --git a/libraries/src/Cache/Cache.php b/libraries/src/Cache/Cache.php index 1666375837e2e..c938acfc9fdbd 100644 --- a/libraries/src/Cache/Cache.php +++ b/libraries/src/Cache/Cache.php @@ -687,7 +687,7 @@ public static function makeId() 'view' => 'WORD', 'layout' => 'WORD', 'tpl' => 'CMD', - 'id' => 'INT', + 'id' => 'STRING', ]; // Use platform defaults if parameter doesn't already exist. diff --git a/libraries/src/Pagination/Pagination.php b/libraries/src/Pagination/Pagination.php index 07a4ea5cc87a0..b1e64777759e2 100644 --- a/libraries/src/Pagination/Pagination.php +++ b/libraries/src/Pagination/Pagination.php @@ -665,21 +665,27 @@ protected function _buildDataObject() // Platform defaults $defaultUrlParams = [ - 'format' => 'WORD', - 'option' => 'WORD', - 'view' => 'WORD', - 'layout' => 'WORD', - 'tpl' => 'CMD', - 'id' => 'INT', - 'Itemid' => 'INT', + 'format' => 'WORD', + 'option' => 'WORD', + 'controller' => 'WORD', + 'view' => 'WORD', + 'layout' => 'STRING', + 'task' => 'CMD', + 'template' => 'CMD', + 'templateStyle' => 'INT', + 'tmpl' => 'CMD', + 'tpl' => 'CMD', + 'id' => 'STRING', + 'Itemid' => 'INT', ]; // Prepare the routes $params = []; + $input = $this->app->getInput(); // Use platform defaults if parameter doesn't already exist. foreach ($defaultUrlParams as $param => $filter) { - $value = $this->app->input->get($param, null, $filter); + $value = $input->get($param, null, $filter); if ($value === null) { continue;