IcingaArguments: avoid false-positives when...
...detecting modification
This commit is contained in:
parent
41ed29df8c
commit
5854e56419
|
@ -100,20 +100,24 @@ class IcingaArguments implements Iterator, Countable, IcingaConfigRenderer
|
||||||
protected function mungeCommandArgument($key, $value)
|
protected function mungeCommandArgument($key, $value)
|
||||||
{
|
{
|
||||||
$attrs = array(
|
$attrs = array(
|
||||||
'argument_name' => $key,
|
'argument_name' => (string) $key,
|
||||||
);
|
);
|
||||||
|
|
||||||
$map = array(
|
$map = array(
|
||||||
'skip_key' => 'skip_key',
|
'skip_key' => 'skip_key',
|
||||||
'repeat_key' => 'repeat_key',
|
'repeat_key' => 'repeat_key',
|
||||||
'required' => 'required',
|
'required' => 'required',
|
||||||
'order' => 'sort_order',
|
// 'order' => 'sort_order',
|
||||||
'description' => 'description',
|
'description' => 'description',
|
||||||
'set_if' => 'set_if',
|
'set_if' => 'set_if',
|
||||||
);
|
);
|
||||||
|
|
||||||
$argValue = null;
|
$argValue = null;
|
||||||
if (is_object($value)) {
|
if (is_object($value)) {
|
||||||
|
if (property_exists($value, 'order')) {
|
||||||
|
$attrs['sort_order'] = (string) $value->order;
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($map as $apiKey => $dbKey) {
|
foreach ($map as $apiKey => $dbKey) {
|
||||||
if (property_exists($value, $apiKey)) {
|
if (property_exists($value, $apiKey)) {
|
||||||
$attrs[$dbKey] = $value->$apiKey;
|
$attrs[$dbKey] = $value->$apiKey;
|
||||||
|
|
Loading…
Reference in New Issue