BetaHostgroupRestriction: fix single-host query
This commit is contained in:
parent
02a3652c86
commit
56af88ee3f
|
@ -18,10 +18,9 @@ class BetaHostgroupRestriction extends ObjectRestriction
|
||||||
$query = $this->db->select()->from(
|
$query = $this->db->select()->from(
|
||||||
array('h' => 'icinga_host'),
|
array('h' => 'icinga_host'),
|
||||||
array('id')
|
array('id')
|
||||||
);
|
)->where('id = ?', $host->id);
|
||||||
|
|
||||||
$this->applyToHostsQuery($query);
|
$this->applyToHostsQuery($query);
|
||||||
|
|
||||||
return (int) $this->db->fetchOne($query) === (int) $host->get('id');
|
return (int) $this->db->fetchOne($query) === (int) $host->get('id');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue