monitoring: Remove ContactgroupQuery::getGroup()

refs #9956
This commit is contained in:
Eric Lippmann 2015-09-29 22:21:05 +02:00
parent 02215592be
commit a9588c9cc2
1 changed files with 10 additions and 24 deletions

View File

@ -13,6 +13,16 @@ class ContactgroupQuery extends IdoQuery
*/
protected $allowCustomVars = true;
/**
* {@inheritdoc}
*/
protected $groupBase = array('contactgroups' => array('cg.contactgroup_id', 'cgo.object_id'));
/**
* {@inheritdoc}
*/
protected $groupOrigin = array('contacts', 'hosts', 'services');
/**
* {@inheritdoc}
*/
@ -201,28 +211,4 @@ class ContactgroupQuery extends IdoQuery
array()
);
}
/**
* {@inheritdoc}
*/
public function getGroup()
{
$group = array();
if ($this->hasJoinedVirtualTable('hosts') || $this->hasJoinedVirtualTable('services')) {
$group = array('cg.contactgroup_id', 'cgo.object_id');
if ($this->hasJoinedVirtualTable('contacts')) {
$group[] = 'c.contact_id';
$group[] = 'co.object_id';
}
} elseif ($this->hasJoinedVirtualTable('contacts')) {
$group = array(
'cg.contactgroup_id',
'cgo.object_id',
'c.contact_id',
'co.object_id'
);
}
return $group;
}
}