parent
4f42da49a8
commit
99b0d63e94
|
@ -88,7 +88,6 @@ class HostcommentQuery extends IdoQuery
|
|||
'hgo.object_id = hg.hostgroup_object_id AND hgo.is_active = 1 AND hgo.objecttype_id = 3',
|
||||
array()
|
||||
);
|
||||
$this->group(array('c.comment_id', 'ho.name1'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -150,6 +149,25 @@ class HostcommentQuery extends IdoQuery
|
|||
'so.object_id = s.service_object_id AND so.is_active = 1 AND so.objecttype_id = 2',
|
||||
array()
|
||||
);
|
||||
$this->group(array('c.comment_id', 'ho.name1'));
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getGroup()
|
||||
{
|
||||
$group = array();
|
||||
if ($this->hasJoinedVirtualTable('hostgroups') || $this->hasJoinedVirtualTable('servicegroups')) {
|
||||
$group = array('c.comment_id', 'ho.object_id');
|
||||
if ($this->hasJoinedVirtualTable('hosts')) {
|
||||
$group[] = 'h.host_id';
|
||||
}
|
||||
|
||||
if ($this->hasJoinedVirtualTable('hoststatus')) {
|
||||
$group[] = 'hs.hoststatus_id';
|
||||
}
|
||||
}
|
||||
|
||||
return $group;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue