mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-24 18:36:59 +03:00
DisplayAction: defaultchecked fix (#3654)
* . * attempt to fix #2943 https://github.com/RSS-Bridge/rss-bridge/issues/2943 * Revert "." This reverts commitc0b6ccfea6
. * lint * Revert "attempt to fix #2943" This reverts commit9f1a66e48d
. * moved fix to BridgeAbstract
This commit is contained in:
parent
078091752a
commit
a786bbd4e0
1 changed files with 8 additions and 8 deletions
|
@ -160,11 +160,7 @@ abstract class BridgeAbstract implements BridgeInterface
|
|||
|
||||
switch ($type) {
|
||||
case 'checkbox':
|
||||
if (!isset($properties['defaultValue'])) {
|
||||
$this->inputs[$context][$name]['value'] = false;
|
||||
} else {
|
||||
$this->inputs[$context][$name]['value'] = $properties['defaultValue'];
|
||||
}
|
||||
$this->inputs[$context][$name]['value'] = $inputs[$context][$name]['value'] ?? false;
|
||||
break;
|
||||
case 'list':
|
||||
if (!isset($properties['defaultValue'])) {
|
||||
|
@ -191,11 +187,15 @@ abstract class BridgeAbstract implements BridgeInterface
|
|||
foreach (static::PARAMETERS['global'] as $name => $properties) {
|
||||
if (isset($inputs[$name])) {
|
||||
$value = $inputs[$name];
|
||||
} else {
|
||||
if ($properties['type'] === 'checkbox') {
|
||||
$value = false;
|
||||
} elseif (isset($properties['defaultValue'])) {
|
||||
$value = $properties['defaultValue'];
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
$this->inputs[$queriedContext][$name]['value'] = $value;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue