[icinga-checkins] icinga.org: icingaweb2-module-director/master: CustomVariables(Legacy): Ignore ARGn vars in toLegacyConfigString

git at icinga.org git at icinga.org
Thu Nov 3 14:23:28 CET 2016


Module: icingaweb2-module-director
Branch: master
Commit: df299fe314dd6f90857813c42dd1e1c8e677face
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=df299fe314dd6f90857813c42dd1e1c8e677face

Author: Markus Frosch <markus.frosch at icinga.com>
Date:   Thu Nov  3 13:41:26 2016 +0100

CustomVariables(Legacy): Ignore ARGn vars in toLegacyConfigString

refs #12919

---

 library/Director/CustomVariable/CustomVariables.php |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/library/Director/CustomVariable/CustomVariables.php b/library/Director/CustomVariable/CustomVariables.php
index d3d3cca..cc0323b 100644
--- a/library/Director/CustomVariable/CustomVariables.php
+++ b/library/Director/CustomVariable/CustomVariables.php
@@ -295,6 +295,12 @@ class CustomVariables implements Iterator, Countable, IcingaConfigRenderer
             /** @var CustomVariable $var */
             // TODO: ctype_alnum + underscore?
             $value = null;
+
+            // vars with ARGn will be handled by IcingaObject::renderLegacyCheck_command
+            if (substr($key, 0, 3) == 'ARG') {
+                continue;
+            }
+
             switch ($type = $var->getType()) {
                 case 'String':
                     # TODO: Make Prefetchable



More information about the icinga-checkins mailing list