Revert "Revert "FilterEditor::handleRequest(): don't apply a filter's changes if the 'Apply' button hasn't been pressed""

This reverts commit 45a6259b4c.
This commit is contained in:
Alexander A. Klimov 2016-04-27 12:46:48 +02:00
parent 45a6259b4c
commit 281e6e8163
1 changed files with 6 additions and 5 deletions

View File

@ -323,12 +323,13 @@ class FilterEditor extends AbstractWidget
if ($request->get('cancel') === 'Cancel') { if ($request->get('cancel') === 'Cancel') {
$this->redirectNow($this->preservedUrl()->without('modifyFilter')); $this->redirectNow($this->preservedUrl()->without('modifyFilter'));
} }
if ($request->get('apply') === 'Apply') {
$filter = $this->applyChanges($request->getPost()); $filter = $this->applyChanges($request->getPost());
$url = $this->url()->setQueryString($filter->toQueryString())->addParams($preserve); $url = $this->url()->setQueryString($filter->toQueryString())->addParams($preserve);
$url->getParams()->add('modifyFilter'); $url->getParams()->add('modifyFilter');
$this->redirectNow($url); $this->redirectNow($url);
} }
}
$this->url()->getParams()->add('modifyFilter'); $this->url()->getParams()->add('modifyFilter');
} }