[icinga-checkins] icinga.org: icingaweb2-module-director/master: IcingaObjectImports: keep passed objects in set()

git at icinga.org git at icinga.org
Tue Aug 23 16:31:37 CEST 2016


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

Author: Thomas Gelf <thomas at gelf.net>
Date:   Tue Aug 23 14:08:51 2016 +0000

IcingaObjectImports: keep passed objects in set()

This reduces lookups and avoids failures when unstored objects are
involved

---

 library/Director/Objects/IcingaObjectImports.php |    1 +
 1 file changed, 1 insertion(+)

diff --git a/library/Director/Objects/IcingaObjectImports.php b/library/Director/Objects/IcingaObjectImports.php
index 289df9f..517424b 100644
--- a/library/Director/Objects/IcingaObjectImports.php
+++ b/library/Director/Objects/IcingaObjectImports.php
@@ -100,6 +100,7 @@ class IcingaObjectImports implements Iterator, Countable, IcingaConfigRenderer
         foreach ($import as $i) {
 
             if ($i instanceof $class) {
+                $this->objects[$i->object_name] = $i;
                 $new[] = $i->object_name;
             } else {
                 $new[] = $i;



More information about the icinga-checkins mailing list