mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
SortBox: use POST instead of GET
This avoids trouble with complex filter URLs fixes #6556
This commit is contained in:
parent
2b23b259fa
commit
4591297e56
@ -138,7 +138,7 @@ class SortBox extends AbstractWidget
|
|||||||
{
|
{
|
||||||
$form = new Form();
|
$form = new Form();
|
||||||
$form->setAttrib('class', 'inline');
|
$form->setAttrib('class', 'inline');
|
||||||
$form->setMethod('GET');
|
$form->setMethod('POST');
|
||||||
$form->setTokenDisabled();
|
$form->setTokenDisabled();
|
||||||
$form->setName($this->name);
|
$form->setName($this->name);
|
||||||
$form->addElement('select', 'sort', array(
|
$form->addElement('select', 'sort', array(
|
||||||
|
@ -446,10 +446,18 @@ class Monitoring_ListController extends Controller
|
|||||||
protected function applyFilters($query)
|
protected function applyFilters($query)
|
||||||
{
|
{
|
||||||
$params = clone $this->params;
|
$params = clone $this->params;
|
||||||
|
$request = $this->getRequest();
|
||||||
|
|
||||||
$limit = $params->shift('limit');
|
$limit = $params->shift('limit');
|
||||||
$sort = $params->shift('sort');
|
|
||||||
$dir = $params->shift('dir');
|
$sort = null;
|
||||||
|
$dir = null;
|
||||||
|
if ($request->isPost()) {
|
||||||
|
$sort = $request->getPost('sort', null);
|
||||||
|
$dir = $request->getPost('dir', null);
|
||||||
|
}
|
||||||
|
$sort = $params->shift('sort', $sort);
|
||||||
|
$dir = $params->shift('dir', $dir);
|
||||||
$page = $params->shift('page');
|
$page = $params->shift('page');
|
||||||
$format = $params->shift('format');
|
$format = $params->shift('format');
|
||||||
$view = $params->shift('view');
|
$view = $params->shift('view');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user