diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:17:47 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:17:47 +0000 |
commit | 5419d4428c86c488a43124f85e5407d7cbae6541 (patch) | |
tree | 772c4221a20fd7d1b3e7e67c6e21755a50e80fd7 /library/Director/Objects/IcingaArguments.php | |
parent | Adding upstream version 1.10.2. (diff) | |
download | icingaweb2-module-director-5419d4428c86c488a43124f85e5407d7cbae6541.tar.xz icingaweb2-module-director-5419d4428c86c488a43124f85e5407d7cbae6541.zip |
Adding upstream version 1.11.1.upstream/1.11.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | library/Director/Objects/IcingaArguments.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/library/Director/Objects/IcingaArguments.php b/library/Director/Objects/IcingaArguments.php index e788da8..22bf914 100644 --- a/library/Director/Objects/IcingaArguments.php +++ b/library/Director/Objects/IcingaArguments.php @@ -155,7 +155,9 @@ class IcingaArguments implements Iterator, Countable, IcingaConfigRenderer if (property_exists($value, 'type')) { // argument is directly set as function, no further properties if ($value->type === 'Function') { - $attrs['argument_value'] = self::COMMENT_DSL_UNSUPPORTED; + $attrs['argument_value'] = property_exists($value, 'body') + ? $value->body + : self::COMMENT_DSL_UNSUPPORTED; $attrs['argument_format'] = 'expression'; } } elseif (property_exists($value, 'value')) { @@ -296,6 +298,7 @@ class IcingaArguments implements Iterator, Countable, IcingaConfigRenderer $this->arguments = IcingaCommandArgument::loadAll($connection, $query, 'argument_name'); $this->cloneStored(); $this->refreshIndex(); + $this->modified = false; return $this; } @@ -360,6 +363,7 @@ class IcingaArguments implements Iterator, Countable, IcingaConfigRenderer } $this->refreshIndex(); $this->cloneStored(); + $this->modified = false; } /** @@ -393,7 +397,9 @@ class IcingaArguments implements Iterator, Countable, IcingaConfigRenderer unset($this->arguments[$key]); } + $this->refreshIndex(); $this->cloneStored(); + $this->modified = false; return $this; } |