Skip to content

Commit

Permalink
[BridgeCard] Display configuration options (if enabled) when bridge h…
Browse files Browse the repository at this point in the history
…as no parameters (#1968)

Updates displayBridgeCard() in BridgeCard to allow configuration options noproxy and cache_timeout to be displayed, if enabled, when a bridge has no parameters in its PARAMETERS array
  • Loading branch information
VerifiedJoseph authored Feb 5, 2021
1 parent eab575d commit 6224fbb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/BridgeCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,13 @@ static function displayBridgeCard($bridgeName, $formats, $isActive = true){
CARD;

// If we don't have any parameter for the bridge, we print a generic form to load it.
if(count($parameters) === 0
|| count($parameters) === 1 && array_key_exists('global', $parameters)) {

if (count($parameters) === 0) {
$card .= self::getForm($bridgeName, $formats, $isActive, $isHttps);

// Display form with cache timeout and/or noproxy options (if enabled) when bridge has no parameters
} else if (count($parameters) === 1 && array_key_exists('global', $parameters)) {
$card .= self::getForm($bridgeName, $formats, $isActive, $isHttps, '', $parameters['global']);

} else {

foreach($parameters as $parameterName => $parameter) {
Expand Down

0 comments on commit 6224fbb

Please sign in to comment.