Merge pull request #3437 from Icinga/fix/revert-pull-request-3413

Revert pull request #3413
This commit is contained in:
Johannes Meyer 2018-04-27 10:19:05 +02:00 committed by GitHub
commit 2c387ea34d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 7 deletions

View File

@ -3,17 +3,16 @@
<?php if (! $this->compact): ?>
<?= $this->tabs; ?>
<?php endif ?>
<h1><?= $this->translate('Contact details') ?></h1>
<div class="circular" style="background-image: url('<?=
$this->href('static/gravatar', array('email' => $contact->contact_email))
?>')"></div>
<?php if (! $contact): ?>
<?= $this->translate('No such contact') ?>: <?= $contactName ?>
</div>
<?php return; endif ?>
<h1><?= $this->translate('Contact details') ?></h1>
<div class="circular" style="background-image: url('<?=
$this->href('static/gravatar', array('email' => $contact->contact_email))
?>')"></div>
<table class="avp" style="width: 70%">
<tbody>
<tr>

View File

@ -148,7 +148,6 @@ class ContactQuery extends IdoQuery
*/
protected function joinHosts()
{
$this->requireVirtualTable('services');
$this->select->joinLeft(
array('hc' => $this->prefix . 'host_contacts'),
'hc.contact_object_id = c.contact_object_id',
@ -159,7 +158,7 @@ class ContactQuery extends IdoQuery
array()
)->joinLeft(
array('ho' => $this->prefix . 'objects'),
'(ho.object_id = h.host_object_id OR ho.object_id = s.host_object_id) AND ho.is_active = 1',
'ho.object_id = h.host_object_id AND ho.is_active = 1',
array()
);
}