From 2b543771488c9e60f06e8982a558e195d9148aea Mon Sep 17 00:00:00 2001 From: teromene Date: Thu, 5 Nov 2015 15:49:55 +0000 Subject: [PATCH] Checking if the parameter mode has a name, same for exampleValue. Change the default bridge name. Signed-off-by: teromene --- index.php | 6 +++++- lib/Bridge.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 3c3d678..01aa538 100644 --- a/index.php +++ b/index.php @@ -185,7 +185,9 @@ CARD; foreach($bridgeElement->parameters as $parameterName => $parameter) { $card .= '
    ' . PHP_EOL; - $card .= '
    '.$parameterName.'
    ' . PHP_EOL; + if(!is_numeric($parameterName)) { + $card .= '
    '.$parameterName.'
    ' . PHP_EOL; + } $card .= '
    ' . PHP_EOL; @@ -194,6 +196,8 @@ CARD; foreach($parameter as $inputEntry) { + if(!isset($inputEntry['exampleValue'])) $inputEntry['exampleValue'] = ""; + $idArg = 'arg-' . $bridgeName . '-' . $parameterName . '-' . $inputEntry['identifier']; $card .= '' . PHP_EOL; diff --git a/lib/Bridge.php b/lib/Bridge.php index b494520..6ff1c38 100644 --- a/lib/Bridge.php +++ b/lib/Bridge.php @@ -17,7 +17,7 @@ abstract class BridgeAbstract implements BridgeInterface{ protected $cache; protected $items = array(); - public $name = "Bridge sans nom"; + public $name = "Unnamed bridge"; public $uri = ""; public $description = 'No description provided'; public $maintainer = 'No maintainer';