Conform to coding guidelines

This commit is contained in:
Matthias Jentsch 2015-05-07 17:17:24 +02:00
parent c6c78989a5
commit 83efc3a4a3
3 changed files with 16 additions and 13 deletions

View File

@ -82,7 +82,7 @@ class Monitoring_DowntimeController extends Controller
'label' => $this->translate('Downtime'),
'url' =>'monitoring/downtimes/show'
)
)->activate('downtime')->extend(new DashboardAction());
)->activate('downtime')->extend(new DashboardAction());
}
/**
@ -92,7 +92,7 @@ class Monitoring_DowntimeController extends Controller
{
$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');

View File

@ -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>
@ -31,7 +32,8 @@
<?= $this->link()->host(
$this->comment->host_name,
$this->comment->host_display_name
); ?>
);
?>
</td>
<?php endif ?>
</tr>
@ -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>

View File

@ -62,7 +62,7 @@ abstract class MonitoredObjectController extends Controller
->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();