From 83efc3a4a307158bcda000b071312eeea1c66d92 Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Thu, 7 May 2015 17:17:24 +0200 Subject: [PATCH] Conform to coding guidelines --- .../controllers/DowntimeController.php | 4 ++-- .../views/scripts/comment/show.phtml | 23 +++++++++++-------- .../Controller/MonitoredObjectController.php | 2 +- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/modules/monitoring/application/controllers/DowntimeController.php b/modules/monitoring/application/controllers/DowntimeController.php index 1fed470fe..c06e0311d 100644 --- a/modules/monitoring/application/controllers/DowntimeController.php +++ b/modules/monitoring/application/controllers/DowntimeController.php @@ -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'); diff --git a/modules/monitoring/application/views/scripts/comment/show.phtml b/modules/monitoring/application/views/scripts/comment/show.phtml index 9010021c3..8216a9c70 100644 --- a/modules/monitoring/application/views/scripts/comment/show.phtml +++ b/modules/monitoring/application/views/scripts/comment/show.phtml @@ -18,11 +18,12 @@ icon('service', $this->translate('Service')); ?> 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 + ); + ?> translate('Host') ?> @@ -31,7 +32,8 @@ link()->host( $this->comment->host_name, $this->comment->host_display_name - ); ?> + ); + ?> @@ -55,10 +57,11 @@ translate('Expires') ?> 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.'); + ?> diff --git a/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php b/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php index 9c0921b9e..9d27b1268 100644 --- a/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php +++ b/modules/monitoring/library/Monitoring/Web/Controller/MonitoredObjectController.php @@ -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();