Skip to content

Commit b9b237a

Browse files
authored
[5.1] Upmerge 2024-08-22
2 parents 22f8289 + 49bc378 commit b9b237a

File tree

4 files changed

+40
-9
lines changed

4 files changed

+40
-9
lines changed

components/com_content/src/View/Archive/HtmlView.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ class HtmlView extends BaseHtmlView
115115
*/
116116
public function display($tpl = null)
117117
{
118+
$app = Factory::getApplication();
118119
$user = $this->getCurrentUser();
119120
$state = $this->get('State');
120121
$items = $this->get('Items');
@@ -219,6 +220,8 @@ public function display($tpl = null)
219220
$this->pagination = &$pagination;
220221
$this->pagination->setAdditionalUrlParam('month', $state->get('filter.month'));
221222
$this->pagination->setAdditionalUrlParam('year', $state->get('filter.year'));
223+
$this->pagination->setAdditionalUrlParam('filter-search', $state->get('list.filter'));
224+
$this->pagination->setAdditionalUrlParam('catid', $app->input->get('catid', [], 'array'));
222225

223226
$this->_prepareDocument();
224227

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,28 @@ public function display($tpl = null)
154154
// Flag indicates to not add limitstart=0 to URL
155155
$this->pagination->hideEmptyLimitstart = true;
156156

157+
// Add additional parameters
158+
$queryParameterList = [
159+
'f' => 'int',
160+
't' => 'array',
161+
'q' => 'string',
162+
'l' => 'cmd',
163+
'd1' => 'string',
164+
'd2' => 'string',
165+
'w1' => 'string',
166+
'w2' => 'string',
167+
];
168+
169+
foreach ($queryParameterList as $parameter => $filter) {
170+
$value = $app->input->get($parameter, null, $filter);
171+
172+
if (\is_null($value)) {
173+
continue;
174+
}
175+
176+
$this->pagination->setAdditionalUrlParam($parameter, $value);
177+
}
178+
157179
// Check for errors.
158180
if (\count($errors = $this->get('Errors'))) {
159181
throw new GenericDataException(implode("\n", $errors), 500);

libraries/src/Cache/Cache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ public static function makeId()
687687
'view' => 'WORD',
688688
'layout' => 'WORD',
689689
'tpl' => 'CMD',
690-
'id' => 'INT',
690+
'id' => 'STRING',
691691
];
692692

693693
// Use platform defaults if parameter doesn't already exist.

libraries/src/Pagination/Pagination.php

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -665,21 +665,27 @@ protected function _buildDataObject()
665665

666666
// Platform defaults
667667
$defaultUrlParams = [
668-
'format' => 'WORD',
669-
'option' => 'WORD',
670-
'view' => 'WORD',
671-
'layout' => 'WORD',
672-
'tpl' => 'CMD',
673-
'id' => 'INT',
674-
'Itemid' => 'INT',
668+
'format' => 'WORD',
669+
'option' => 'WORD',
670+
'controller' => 'WORD',
671+
'view' => 'WORD',
672+
'layout' => 'STRING',
673+
'task' => 'CMD',
674+
'template' => 'CMD',
675+
'templateStyle' => 'INT',
676+
'tmpl' => 'CMD',
677+
'tpl' => 'CMD',
678+
'id' => 'STRING',
679+
'Itemid' => 'INT',
675680
];
676681

677682
// Prepare the routes
678683
$params = [];
684+
$input = $this->app->getInput();
679685

680686
// Use platform defaults if parameter doesn't already exist.
681687
foreach ($defaultUrlParams as $param => $filter) {
682-
$value = $this->app->input->get($param, null, $filter);
688+
$value = $input->get($param, null, $filter);
683689

684690
if ($value === null) {
685691
continue;

0 commit comments

Comments
 (0)