Skip to content

Commit

Permalink
ServicenotificationQuery: Fix invalid joins
Browse files Browse the repository at this point in the history
refs #9009
  • Loading branch information
Johannes Meyer committed Jun 16, 2015
1 parent 1dd21c2 commit 7a5156b
Showing 1 changed file with 6 additions and 6 deletions.
Expand Up @@ -164,15 +164,15 @@ protected function joinAcknowledgements()
protected function joinHostgroups()
{
$this->requireVirtualTable('services');
$this->select->join(
$this->select->joinLeft(
array('hgm' => $this->prefix . 'hostgroup_members'),
'hgm.host_object_id = s.host_object_id',
array()
)->join(
)->joinLeft(
array('hg' => $this->prefix . 'hostgroups'),
'hg.hostgroup_id = hgm.hostgroup_id',
array()
)->join(
)->joinLeft(
array('hgo' => $this->prefix . 'objects'),
'hgo.object_id = hg.hostgroup_object_id AND hgo.is_active = 1 AND hgo.objecttype_id = 3',
array()
Expand Down Expand Up @@ -201,15 +201,15 @@ protected function joinHosts()
*/
protected function joinServicegroups()
{
$this->select->join(
$this->select->joinLeft(
array('sgm' => $this->prefix . 'servicegroup_members'),
'sgm.service_object_id = so.object_id',
array()
)->join(
)->joinLeft(
array('sg' => $this->prefix . 'servicegroups'),
'sg.' . $this->servicegroup_id . ' = sgm.servicegroup_id',
array()
)->join(
)->joinLeft(
array('sgo' => $this->prefix . 'objects'),
'sgo.object_id = sg.servicegroup_object_id AND sgo.is_active = 1 AND sgo.objecttype_id = 4',
array()
Expand Down

0 comments on commit 7a5156b

Please sign in to comment.