Ido/Query: small fixes

Replaced baseQuery in ContactGroupQuery, added short host/service
columns to CustomvarQuery.
This commit is contained in:
Thomas Gelf 2014-06-13 10:44:03 +00:00
parent 97c55d8dad
commit 4c76f5ab02
2 changed files with 3 additions and 1 deletions

View File

@ -113,7 +113,7 @@ class ContactgroupQuery extends IdoQuery
+-------------------------+-------------+------------+------------------------+
*/
$this->baseQuery->distinct()->join(
$this->select->distinct()->join(
array('scg' => $this->prefix . 'service_contactgroups'),
// array('scg' => $scgSub),
'scg.contactgroup_object_id = cg.contactgroup_object_id',

View File

@ -10,8 +10,10 @@ class CustomvarQuery extends IdoQuery
'varvalue' => 'cvs.varvalue',
),
'objects' => array(
'host' => 'cvo.name1 COLLATE latin1_general_ci',
'host_name' => 'cvo.name1 COLLATE latin1_general_ci',
'service_host_name' => 'cvo.name1 COLLATE latin1_general_ci',
'service' => 'cvo.name2 COLLATE latin1_general_ci',
'service_description' => 'cvo.name2 COLLATE latin1_general_ci',
'contact_name' => 'cvo.name1 COLLATE latin1_general_ci',
'object_type' => "CASE cvo.objecttype_id WHEN 1 THEN 'host' WHEN 2 THEN 'service' WHEN 10 THEN 'contact' ELSE 'invalid' END",