mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 16:54:06 +02:00
IcingaObject: return booleans in plain objects
This commit is contained in:
parent
8ecd799d81
commit
03a5708a00
@ -1472,7 +1472,18 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
|||||||
|
|
||||||
// TODO: Do not ship null properties based on flag?
|
// TODO: Do not ship null properties based on flag?
|
||||||
if (!$skipDefaults || $this->differsFromDefaultValue($k, $v)) {
|
if (!$skipDefaults || $this->differsFromDefaultValue($k, $v)) {
|
||||||
$props[$k] = $v;
|
if ($k === 'disabled' || $this->propertyIsBoolean($k)) {
|
||||||
|
if ($v === 'y') {
|
||||||
|
$props[$k] = true;
|
||||||
|
} elseif ($v === 'n') {
|
||||||
|
$props[$k] = false;
|
||||||
|
} else {
|
||||||
|
$props[$k] = $v;
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$props[$k] = $v;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user