mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-01-29 11:58:23 +01:00
[core] add explicit support for list default value
and implicit support for text and number parameters Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
This commit is contained in:
parent
806f38b42d
commit
74d876b585
@ -317,6 +317,18 @@ abstract class BridgeAbstract implements BridgeInterface {
|
||||
$this->inputs[$context][$name]['value']=$properties['defaultValue'];
|
||||
}
|
||||
break;
|
||||
case 'list':
|
||||
if(!isset($properties['defaultValue'])){
|
||||
$this->inputs[$context][$name]['value']=reset($properties['values']);
|
||||
}else{
|
||||
$this->inputs[$context][$name]['value']=$properties['defaultValue'];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if(isset($properties['defaultValue'])){
|
||||
$this->inputs[$context][$name]['value']=$properties['defaultValue'];
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user