parent
02215592be
commit
a9588c9cc2
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue