Skip to content

Commit

Permalink
Conform to coding guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
majentsch committed May 7, 2015
1 parent c6c7898 commit 83efc3a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
Expand Up @@ -82,7 +82,7 @@ public function init()
'label' => $this->translate('Downtime'),
'url' =>'monitoring/downtimes/show'
)
)->activate('downtime')->extend(new DashboardAction());
)->activate('downtime')->extend(new DashboardAction());
}

/**
Expand All @@ -92,7 +92,7 @@ public function showAction()
{
$this->view->downtime = $this->downtime;
$this->view->isService = $this->isService;
$this->view->stateName = isset($this->downtime->service_description) ?
$this->view->stateName = isset($this->downtime->service_description) ?
Service::getStateText($this->downtime->service_state) :
Host::getStateText($this->downtime->host_state);
$this->view->listAllLink = Url::fromPath('monitoring/list/downtimes');
Expand Down
23 changes: 13 additions & 10 deletions modules/monitoring/application/views/scripts/comment/show.phtml
Expand Up @@ -18,11 +18,12 @@
<td>
<?= $this->icon('service', $this->translate('Service')); ?>
<?= $this->link()->service(
$this->comment->service_description,
$this->comment->service_display_name,
$this->comment->host_name,
$this->comment->host_display_name
); ?>
$this->comment->service_description,
$this->comment->service_display_name,
$this->comment->host_name,
$this->comment->host_display_name
);
?>
</td>
<?php else: ?>
<th> <?= $this->translate('Host') ?> </th>
Expand All @@ -31,7 +32,8 @@
<?= $this->link()->host(
$this->comment->host_name,
$this->comment->host_display_name
); ?>
);
?>
</td>
<?php endif ?>
</tr>
Expand All @@ -55,10 +57,11 @@
<th><?= $this->translate('Expires') ?></th>
<td>
<?= $this->comment->expiration ? sprintf(
$this->translate('This comment expires on %s at %s.'),
date('d.m.y', $this->comment->expiration),
date('H:i', $this->comment->expiration)
) : $this->translate('This comment does not expire.'); ?>
$this->translate('This comment expires on %s at %s.'),
date('d.m.y', $this->comment->expiration),
date('H:i', $this->comment->expiration)
) : $this->translate('This comment does not expire.');
?>
</td>
</tr>

Expand Down
Expand Up @@ -62,7 +62,7 @@ public function showAction()
->handleRequest();
$this->view->checkNowForm = $checkNowForm;
}
if ( ! in_array((int) $this->object->state, array(0, 99))) {
if (! in_array((int) $this->object->state, array(0, 99))) {
if ((bool) $this->object->acknowledged) {
if ($auth->hasPermission('monitoring/command/remove-acknowledgement')) {
$removeAckForm = new RemoveAcknowledgementCommandForm();
Expand Down

0 comments on commit 83efc3a

Please sign in to comment.