[icinga-checkins] icinga.org: icingaweb2-module-director/master: IcingaObject(Legacy): Render legacy customvars

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


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

Author: Markus Frosch <markus.frosch at icinga.com>
Date:   Fri Oct 14 11:53:26 2016 +0200

IcingaObject(Legacy): Render legacy customvars

refs #12919

---

 library/Director/Objects/IcingaObject.php |   14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/library/Director/Objects/IcingaObject.php b/library/Director/Objects/IcingaObject.php
index b420356..7c6cf20 100644
--- a/library/Director/Objects/IcingaObject.php
+++ b/library/Director/Objects/IcingaObject.php
@@ -1854,6 +1854,18 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
     /**
      * @return string
      */
+    protected function renderLegacyCustomVars()
+    {
+        if ($this->supportsCustomVars()) {
+            return $this->vars()->toLegacyConfigString();
+        } else {
+            return '';
+        }
+    }
+
+    /**
+     * @return string
+     */
     protected function renderGroups()
     {
         if ($this->supportsGroups()) {
@@ -2024,7 +2036,7 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
             $this->renderLegacyGroups(),
             //$this->renderMultiRelations(),
             //$this->renderCustomExtensions(),
-            //$this->renderCustomVars(),
+            $this->renderLegacyCustomVars(),
             $this->renderLegacySuffix()
         ));
 



More information about the icinga-checkins mailing list