Readability, small fixes

This commit is contained in:
Thomas Gelf 2013-08-20 23:47:56 +02:00 committed by Eric Lippmann
parent 76ecc9184d
commit d5c86c5328

View File

@ -219,21 +219,6 @@ class StatusQuery extends AbstractQuery
),
);
public function group($col)
{
$this->baseQuery->group($col);
}
protected function getDefaultColumns()
{
return $this->columnMap['hosts'];
/*
+ $this->columnMap['services']
+ $this->columnMap['hoststatus']
+ $this->columnMap['servicestatus']
;*/
}
protected function joinBaseTables()
{
// TODO: Shall we always add hostobject?
@ -273,16 +258,15 @@ class StatusQuery extends AbstractQuery
array()
)->join(
array('so' => $this->prefix . 'objects'),
'so.'.$this->object_id.' = s.service_object_id AND so.is_active = 1',
'so.' . $this->object_id . ' = s.service_object_id AND so.is_active = 1',
array()
)->joinLeft(
array('ss' => $this->prefix . 'servicestatus'),
'so.'.$this->object_id.' = ss.service_object_id',
'so.' . $this->object_id . ' = ss.service_object_id',
array()
);
}
// TODO: Test this one, doesn't seem to work right now
protected function joinHostgroups()
{
if ($this->hasJoinedVirtualTable('services')) {
@ -300,7 +284,7 @@ class StatusQuery extends AbstractQuery
array()
)->join(
array('hg' => $this->prefix . 'hostgroups'),
'hgm.hostgroup_id = hg'.$this->hostgroup_id,
'hgm.hostgroup_id = hg' . $this->hostgroup_id,
array()
);