diff --git a/application/controllers/HostController.php b/application/controllers/HostController.php index 09352d0..e22edde 100644 --- a/application/controllers/HostController.php +++ b/application/controllers/HostController.php @@ -55,9 +55,8 @@ class HostController extends Controller ->from('hoststatus', array('host_name')) ->where('host_name', $hostName); - /** @var DataView $restrictedQuery */ - $restrictedQuery = $this->applyRestriction('monitoring/filter/objects', $query); - if ($restrictedQuery->fetchRow() !== false) { + $this->applyRestriction('monitoring/filter/objects', $query); + if ($query->fetchRow() !== false) { $this->redirectNow(Url::fromPath('monitoring/host/show')->setParams($this->params)); } } diff --git a/application/controllers/ServiceController.php b/application/controllers/ServiceController.php index f10c791..671d00c 100644 --- a/application/controllers/ServiceController.php +++ b/application/controllers/ServiceController.php @@ -62,9 +62,8 @@ class ServiceController extends Controller ->where('host_name', $hostName) ->where('service_description', $serviceName); - /** @var DataView $restrictedQuery */ - $restrictedQuery = $this->applyRestriction('monitoring/filter/objects', $query); - if ($restrictedQuery->fetchRow() !== false) { + $this->applyRestriction('monitoring/filter/objects', $query); + if ($query->fetchRow() !== false) { $this->redirectNow(Url::fromPath('monitoring/service/show')->setParams($this->params)); } }