[icinga-checkins] icinga.org: icingaweb2-module-director/master: IcingaConfig:: fix db connection reference

git at icinga.org git at icinga.org
Wed Feb 10 17:40:11 CET 2016


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

Author: Thomas Gelf <thomas at gelf.net>
Date:   Wed Feb 10 17:39:56 2016 +0100

IcingaConfig:: fix db connection reference

---

 library/Director/IcingaConfig/IcingaConfig.php |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/library/Director/IcingaConfig/IcingaConfig.php b/library/Director/IcingaConfig/IcingaConfig.php
index b1142ff..131724b 100644
--- a/library/Director/IcingaConfig/IcingaConfig.php
+++ b/library/Director/IcingaConfig/IcingaConfig.php
@@ -283,7 +283,7 @@ throw $e;
         $this->configFile(
             sprintf(
                 'zones.d/%s/001-director-basics',
-                $this->db()->getDefaultGlobalZoneName()
+                $this->connection->getDefaultGlobalZoneName()
             )
         )->prepend(
             "\nconst DirectorStageDir = dirname(dirname(current_filename))\n"
@@ -380,7 +380,7 @@ throw $e;
             $endpoints[] = IcingaEndpoint::create($props);
             $zones[] = IcingaZone::create(array(
                 'object_name' => $name,
-                'parent'      => $this->db()->getMasterZoneName()
+                'parent'      => $this->connection->getMasterZoneName()
             ), $this->connection)->setEndpointList(array($name));
         }
 
@@ -401,8 +401,8 @@ throw $e;
     {
         Benchmark::measure(sprintf('Generating %d %s', count($objects), $type));
         if (empty($objects)) return $this;
-        $masterZone = $this->db()->getMasterZoneName();
-        $globalZone = $this->db()->getDefaultGlobalZoneName();
+        $masterZone = $this->connection->getMasterZoneName();
+        $globalZone = $this->connection->getDefaultGlobalZoneName();
         $file = null;
 
         foreach ($objects as $object) {



More information about the icinga-checkins mailing list