parent
104c8e7a2b
commit
bf7e6b3591
|
@ -69,14 +69,8 @@ class ServicecommentQuery extends IdoQuery
|
||||||
array()
|
array()
|
||||||
)->join(
|
)->join(
|
||||||
array('so' => $this->prefix . 'objects'),
|
array('so' => $this->prefix . 'objects'),
|
||||||
'so.object_id = c.object_id',
|
'so.object_id = c.object_id AND so.is_active = 1 AND so.objecttype_id = 2',
|
||||||
array()
|
array()
|
||||||
)->where(
|
|
||||||
'so.is_active = ?',
|
|
||||||
1
|
|
||||||
)->where(
|
|
||||||
'so.objecttype_id = 2',
|
|
||||||
1
|
|
||||||
);
|
);
|
||||||
$this->joinedVirtualTables['comments'] = true;
|
$this->joinedVirtualTables['comments'] = true;
|
||||||
}
|
}
|
||||||
|
@ -96,15 +90,8 @@ class ServicecommentQuery extends IdoQuery
|
||||||
array()
|
array()
|
||||||
)->join(
|
)->join(
|
||||||
array('hgo' => $this->prefix . 'objects'),
|
array('hgo' => $this->prefix . 'objects'),
|
||||||
'hgo.object_id = hg.hostgroup_object_id',
|
'hgo.object_id = hg.hostgroup_object_id AND hgo.is_active = 1 AND hgo.objecttype_id = 3',
|
||||||
array()
|
array()
|
||||||
)->where(
|
|
||||||
'hgo.is_active = ?',
|
|
||||||
1
|
|
||||||
)
|
|
||||||
->where(
|
|
||||||
'hgo.objecttype_id = ?',
|
|
||||||
3
|
|
||||||
);
|
);
|
||||||
$this->group(array('c.comment_id', 'so.name2', 'so.name1'));
|
$this->group(array('c.comment_id', 'so.name2', 'so.name1'));
|
||||||
}
|
}
|
||||||
|
@ -150,15 +137,8 @@ class ServicecommentQuery extends IdoQuery
|
||||||
array()
|
array()
|
||||||
)->join(
|
)->join(
|
||||||
array('sgo' => $this->prefix . 'objects'),
|
array('sgo' => $this->prefix . 'objects'),
|
||||||
'sgo.object_id = sg.servicegroup_object_id',
|
'sgo.object_id = sg.servicegroup_object_id AND sgo.is_active = 1 AND sgo.objecttype_id = 4',
|
||||||
array()
|
array()
|
||||||
)->where(
|
|
||||||
'sgo.is_active = ?',
|
|
||||||
1
|
|
||||||
)
|
|
||||||
->where(
|
|
||||||
'sgo.objecttype_id = ?',
|
|
||||||
4
|
|
||||||
);
|
);
|
||||||
$this->group(array('c.comment_id', 'so.name2', 'so.name1'));
|
$this->group(array('c.comment_id', 'so.name2', 'so.name1'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue