params->shift('icingadb'); if ($icingadb && Module::exists('icingadb')) { $hostName = $this->params->shift('host'); $query = Host::on($this->getDb()); IcingaDbObject::applyIcingaDbRestrictions($query); $query->getSelectBase() ->where(['host.name = ?' => $hostName]); $host = $query->first(); $this->params->add('name', $hostName); if ($host !== false) { $this->redirectNow(Url::fromPath('icingadb/host')->setParams($this->params)); } } else { $hostName = $this->params->get('host'); $query = $this->backend->select() ->from('hoststatus', array('host_name')) ->where('host_name', $hostName); if ($this->applyRestriction('monitoring/filter/objects', $query)->fetchRow() !== false) { $this->redirectNow(Url::fromPath('monitoring/host/show')->setParams($this->params)); } } $this->view->host = $hostName; } }