Skip to content

Commit

Permalink
Checking if the parameter mode has a name, same for exampleValue.
Browse files Browse the repository at this point in the history
Change the default bridge name.

Signed-off-by: teromene <[email protected]>
  • Loading branch information
teromene authored and Mitsukarenai committed Dec 6, 2015
1 parent 53ac336 commit 715ad3b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@ function displayBridgeCard($bridgeName, $formats, $isActive = true)
foreach($bridgeElement->parameters as $parameterName => $parameter)
{
$card .= '<ol class="list-use">' . PHP_EOL;
$card .= '<h5>'.$parameterName.'</h5>' . PHP_EOL;
if(!is_numeric($parameterName)) {
$card .= '<h5>'.$parameterName.'</h5>' . PHP_EOL;
}
$card .= '<form method="POST" action="?">
<input type="hidden" name="action" value="display" />
<input type="hidden" name="bridge" value="' . $bridgeName . '" />' . PHP_EOL;
Expand All @@ -212,6 +214,8 @@ function displayBridgeCard($bridgeName, $formats, $isActive = true)

foreach($parameter as $inputEntry) {

if(!isset($inputEntry['exampleValue'])) $inputEntry['exampleValue'] = "";

$idArg = 'arg-' . $bridgeName . '-' . $parameterName . '-' . $inputEntry['identifier'];

$card .= '<label for="' .$idArg. '">' .$inputEntry['name']. ' : </label>' . PHP_EOL;
Expand Down
2 changes: 1 addition & 1 deletion lib/Bridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 715ad3b

Please sign in to comment.