mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
IcingaObjectImports: fix adding objects
This commit is contained in:
parent
271dc6add5
commit
d042f8d599
@ -175,14 +175,18 @@ class IcingaObjectImports implements Iterator, Countable, IcingaConfigRenderer
|
||||
return $this;
|
||||
}
|
||||
|
||||
if (array_key_exists($import, $this->imports)) {
|
||||
return $this;
|
||||
}
|
||||
|
||||
if ($import instanceof $class) {
|
||||
if (array_key_exists($import->object_name, $this->imports)) {
|
||||
return $this;
|
||||
}
|
||||
|
||||
$this->imports[$import->object_name] = $import->object_name;
|
||||
$this->objects[$import->object_name] = $import;
|
||||
} elseif (is_string($import)) {
|
||||
if (array_key_exists($import, $this->imports)) {
|
||||
return $this;
|
||||
}
|
||||
|
||||
$this->imports[$import] = $import;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user