parent
99b0d63e94
commit
d66b7e85e7
|
@ -93,7 +93,6 @@ class ServicecommentQuery extends IdoQuery
|
||||||
'hgo.object_id = hg.hostgroup_object_id AND hgo.is_active = 1 AND hgo.objecttype_id = 3',
|
'hgo.object_id = hg.hostgroup_object_id AND hgo.is_active = 1 AND hgo.objecttype_id = 3',
|
||||||
array()
|
array()
|
||||||
);
|
);
|
||||||
$this->group(array('c.comment_id', 'so.name2', 'so.name1'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -140,7 +139,6 @@ class ServicecommentQuery extends IdoQuery
|
||||||
'sgo.object_id = sg.servicegroup_object_id AND sgo.is_active = 1 AND sgo.objecttype_id = 4',
|
'sgo.object_id = sg.servicegroup_object_id AND sgo.is_active = 1 AND sgo.objecttype_id = 4',
|
||||||
array()
|
array()
|
||||||
);
|
);
|
||||||
$this->group(array('c.comment_id', 'so.name2', 'so.name1'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -166,4 +164,32 @@ class ServicecommentQuery extends IdoQuery
|
||||||
array()
|
array()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getGroup()
|
||||||
|
{
|
||||||
|
$group = array();
|
||||||
|
if ($this->hasJoinedVirtualTable('hostgroups') || $this->hasJoinedVirtualTable('servicegroups')) {
|
||||||
|
$group = array('c.comment_id', 'so.object_id');
|
||||||
|
if ($this->hasJoinedVirtualTable('hosts')) {
|
||||||
|
$group[] = 'h.host_id';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->hasJoinedVirtualTable('services')) {
|
||||||
|
$group[] = 's.service_id';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->hasJoinedVirtualTable('hoststatus')) {
|
||||||
|
$group[] = 'hs.hoststatus_id';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->hasJoinedVirtualTable('servicestatus')) {
|
||||||
|
$group[] = 'ss.servicestatus_id';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $group;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue