HostgroupQuery: Rename baseQuery to select

This commit is contained in:
Eric Lippmann 2014-04-15 18:02:03 +02:00
parent 32fa7b314c
commit 8b471e29e5

View File

@ -19,22 +19,20 @@ class HostgroupQuery extends IdoQuery
protected function joinBaseTables() protected function joinBaseTables()
{ {
$this->baseQuery = $this->db->select()->from( $this->select->from(
array('hg' => $this->prefix . 'hostgroups'), array('hg' => $this->prefix . 'hostgroups'),
array() array()
)->join( )->join(
array('hgo' => $this->prefix . 'objects'), array('hgo' => $this->prefix . 'objects'),
'hg.hostgroup_object_id = hgo.' . $this->object_id 'hg.hostgroup_object_id = hgo.' . $this->object_id . ' AND hgo.is_active = 1',
. ' AND hgo.is_active = 1',
array() array()
); );
$this->joinedVirtualTables = array('hostgroups' => true); $this->joinedVirtualTables = array('hostgroups' => true);
} }
protected function joinHosts() protected function joinHosts()
{ {
$this->baseQuery->join( $this->select->join(
array('hgm' => $this->prefix . 'hostgroup_members'), array('hgm' => $this->prefix . 'hostgroup_members'),
'hgm.hostgroup_id = hg.hostgroup_id', 'hgm.hostgroup_id = hg.hostgroup_id',
array() array()