diff --git a/library/Icingadb/Web/Controller.php b/library/Icingadb/Web/Controller.php index 3d5eba6a..a570666c 100644 --- a/library/Icingadb/Web/Controller.php +++ b/library/Icingadb/Web/Controller.php @@ -12,7 +12,6 @@ use Icinga\Module\Icingadb\Common\Database; use Icinga\Module\Icingadb\Compat\MonitoringRestrictions; use Icinga\Module\Icingadb\Compat\UrlMigrator; use Icinga\Module\Icingadb\Widget\BaseItemList; -use Icinga\Module\Icingadb\Widget\FilterControl; use Icinga\Module\Icingadb\Widget\ViewModeSwitcher; use InvalidArgumentException; use ipl\Html\Html; @@ -229,42 +228,6 @@ class Controller extends CompatController return $searchBar; } - /** - * Create and return the FilterControl - * - * @param Query $query - * @param array $preserveParams - * - * @return FilterControl - */ - public function createFilterControl(Query $query, array $preserveParams = null) - { - $request = clone $this->getRequest(); - $params = clone $this->params; - - if (! empty($preserveParams)) { - foreach ($preserveParams as $param) { - if (! $params->has($param) && ($value = $request->getUrl()->getParam($param)) !== null) { - $params->set($param, $value); - } - } - } - - $request->getUrl()->setParams($params); - - $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; - } - /** * Create and return the ViewModeSwitcher *