Controller: Already shift filter params in createFilterControl()

This commit is contained in:
Johannes Meyer 2020-05-28 16:10:52 +02:00
parent 8e4eb677bb
commit 98c2e9f7bf
2 changed files with 7 additions and 8 deletions

View file

@ -146,6 +146,13 @@ class Controller extends CompatController
$filterControl = new FilterControl($query, $preserveParams);
$filterControl->handleRequest($request);
// We're cloning the params, the editor does it, so we have to shift these ourselves
$this->params->shift('addFilter');
$this->params->shift('removeFilter');
$this->params->shift('stripFilter');
$this->params->shift('modifyFilter');
$this->params->shift('q');
return $filterControl;
}

View file

@ -38,14 +38,6 @@ class FilterControl extends HtmlDocument
public function handleRequest(Request $request)
{
$this->getFilterEditor()->handleRequest($request);
// The editor clones the url prior shifting these so we have to do it again here
$params = $request->getUrl()->getParams();
$params->shift('addFilter');
$params->shift('removeFilter');
$params->shift('stripFilter');
$params->shift('modifyFilter');
$params->shift('q');
}
/**