parent
988bc2cf44
commit
1a32d289b8
|
@ -73,14 +73,8 @@ class HostcommenthistoryQuery extends IdoQuery
|
||||||
array()
|
array()
|
||||||
)->join(
|
)->join(
|
||||||
array('ho' => $this->prefix . 'objects'),
|
array('ho' => $this->prefix . 'objects'),
|
||||||
'ho.object_id = hch.object_id',
|
'ho.object_id = hch.object_id AND ho.is_active = 1 AND ho.objecttype_id = 1',
|
||||||
array()
|
array()
|
||||||
)->where(
|
|
||||||
'ho.is_active = ?',
|
|
||||||
1
|
|
||||||
)->where(
|
|
||||||
'ho.objecttype_id = ?',
|
|
||||||
1
|
|
||||||
);
|
);
|
||||||
$this->joinedVirtualTables['commenthistory'] = true;
|
$this->joinedVirtualTables['commenthistory'] = true;
|
||||||
$this->joinedVirtualTables['history'] = true;
|
$this->joinedVirtualTables['history'] = true;
|
||||||
|
@ -101,15 +95,8 @@ class HostcommenthistoryQuery 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->select->group(array('hch.commenthistory_id', 'ho.name1'));
|
$this->select->group(array('hch.commenthistory_id', 'ho.name1'));
|
||||||
}
|
}
|
||||||
|
@ -142,15 +129,8 @@ class HostcommenthistoryQuery 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
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,15 +145,8 @@ class HostcommenthistoryQuery extends IdoQuery
|
||||||
array()
|
array()
|
||||||
)->join(
|
)->join(
|
||||||
array('so' => $this->prefix . 'objects'),
|
array('so' => $this->prefix . 'objects'),
|
||||||
'so.object_id = s.service_object_id',
|
'so.object_id = s.service_object_id AND so.is_active = 1 AND so.objecttype_id = 2',
|
||||||
array()
|
array()
|
||||||
)->where(
|
|
||||||
'so.is_active = ?',
|
|
||||||
1
|
|
||||||
)
|
|
||||||
->where(
|
|
||||||
'so.objecttype_id = ?',
|
|
||||||
2
|
|
||||||
);
|
);
|
||||||
$this->select->group(array('hch.commenthistory_id', 'ho.name1'));
|
$this->select->group(array('hch.commenthistory_id', 'ho.name1'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue