mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 08:14:03 +02:00
parent
f20193edb9
commit
11ed6d6cfa
@ -100,7 +100,6 @@ class ServicecommenthistoryQuery 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->select->group(array('sch.commenthistory_id', 'so.name1', 'so.name2'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -134,7 +133,6 @@ class ServicecommenthistoryQuery 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->select->group(array('sch.commenthistory_id', 'so.name1', 'so.name2'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -148,4 +146,21 @@ class ServicecommenthistoryQuery extends IdoQuery
|
|||||||
array()
|
array()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function getGroup()
|
||||||
|
{
|
||||||
|
$group = array();
|
||||||
|
if ($this->hasJoinedVirtualTable('hostgroups') || $this->hasJoinedVirtualTable('servicegroups')) {
|
||||||
|
$group = array('sch.commenthistory_id', 'so.object_id');
|
||||||
|
if ($this->hasJoinedVirtualTable('services')) {
|
||||||
|
$group[] = 'h.host_id';
|
||||||
|
$group[] = 's.service_id';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $group;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user