diff --git a/application/forms/BpConfigForm.php b/application/forms/BpConfigForm.php index b22bd23..abf3111 100644 --- a/application/forms/BpConfigForm.php +++ b/application/forms/BpConfigForm.php @@ -40,7 +40,7 @@ class BpConfigForm extends QuickForm 'label' => $this->translate('Title'), 'description' => $this->translate( 'Usually this title will be shown for this process. Equals name' - . ' if not given' + . ' if not given' ), )); @@ -48,7 +48,7 @@ class BpConfigForm extends QuickForm 'label' => $this->translate('Backend'), 'description' => $this->translate( 'Icinga Web Monitoring Backend where current object states for' - . ' this process should be retrieved from' + . ' this process should be retrieved from' ), 'multiOptions' => array( null => $this->translate('Use the configured default backend'), @@ -193,7 +193,9 @@ class BpConfigForm extends QuickForm public function shouldBeDeleted() { - if (! $this->hasDeleteButton()) return false; + if (! $this->hasDeleteButton()) { + return false; + } $name = $this->deleteButtonName; return $this->getSentValue($name) === $this->getElement($name)->getLabel(); diff --git a/application/views/helpers/RenderStateBadges.php b/application/views/helpers/RenderStateBadges.php index 7a4d708..bf24edc 100644 --- a/application/views/helpers/RenderStateBadges.php +++ b/application/views/helpers/RenderStateBadges.php @@ -13,7 +13,7 @@ class Zend_View_Helper_RenderStateBadges extends Zend_View_Helper_Abstract foreach ($summary as $state => $cnt) { if ($cnt === 0 || $state === 'OK' - ||$ state === 'UP' + || $state === 'UP' ) { continue; } diff --git a/library/Businessprocess/BpNode.php b/library/Businessprocess/BpNode.php index f71f531..895836e 100644 --- a/library/Businessprocess/BpNode.php +++ b/library/Businessprocess/BpNode.php @@ -362,7 +362,10 @@ class BpNode extends Node foreach ($this->getChildren() as $name => $child) { $children[] = (string) $child; - if (array_key_exists($name, $rendered)) { continue; } + if (array_key_exists($name, $rendered)) { + continue; + } + if ($child instanceof BpNode) { $cfg .= $child->toLegacyConfigString($rendered) . "\n"; } diff --git a/library/Businessprocess/MonitoredNode.php b/library/Businessprocess/MonitoredNode.php index 85ec5fe..2ffd77f 100644 --- a/library/Businessprocess/MonitoredNode.php +++ b/library/Businessprocess/MonitoredNode.php @@ -21,4 +21,4 @@ abstract class MonitoredNode extends Node ) ); } -} \ No newline at end of file +} diff --git a/library/Businessprocess/Node.php b/library/Businessprocess/Node.php index 7188af7..fba675b 100644 --- a/library/Businessprocess/Node.php +++ b/library/Businessprocess/Node.php @@ -465,8 +465,12 @@ abstract class Node return ' '; } - public function toLegacyConfigString(& $rendered = array()) { return '';} - //abstract public function toLegacyConfigString(); + // TODO: Why isn't this abstract? + // abstract public function toLegacyConfigString(); + public function toLegacyConfigString(& $rendered = array()) + { + return ''; + } public function __toString() { diff --git a/library/Businessprocess/ServiceNode.php b/library/Businessprocess/ServiceNode.php index b169e24..299c679 100644 --- a/library/Businessprocess/ServiceNode.php +++ b/library/Businessprocess/ServiceNode.php @@ -49,7 +49,7 @@ class ServiceNode extends MonitoredNode if (! $this->bp->isLocked()) { - $url = Url::fromPath( 'businessprocess/node/simulate', array( + $url = Url::fromPath('businessprocess/node/simulate', array( 'config' => $this->bp->getName(), 'node' => $this->name ));