Skip to content

Commit

Permalink
[4.4] Pagination fixes part 2 (#43967)
Browse files Browse the repository at this point in the history
* consider missing parameters and read input from get

* Update components/com_finder/src/View/Search/HtmlView.php

Co-authored-by: Richard Fath <[email protected]>

* revert get change

---------

Co-authored-by: Richard Fath <[email protected]>
  • Loading branch information
SniperSister and richard67 authored Aug 23, 2024
1 parent 129bd28 commit 936f5da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/com_content/src/View/Archive/HtmlView.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public function display($tpl = null)
$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->pagination->setAdditionalUrlParam('catid', $app->getInput()->get->get('catid', [], 'array'));

$this->_prepareDocument();

Expand Down
6 changes: 5 additions & 1 deletion components/com_finder/src/View/Search/HtmlView.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ public function display($tpl = null)
// Flag indicates to not add limitstart=0 to URL
$this->pagination->hideEmptyLimitstart = true;

$input = $app->getInput()->get;

// Add additional parameters
$queryParameterList = [
'f' => 'int',
Expand All @@ -163,10 +165,12 @@ public function display($tpl = null)
'd2' => 'string',
'w1' => 'string',
'w2' => 'string',
'o' => 'word',
'od' => 'word',
];

foreach ($queryParameterList as $parameter => $filter) {
$value = $app->input->get($parameter, null, $filter);
$value = $input->get($parameter, null, $filter);

if (is_null($value)) {
continue;
Expand Down

0 comments on commit 936f5da

Please sign in to comment.