mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 01:04:12 +02:00
parent
092bb8c3f6
commit
d2cd8c3939
@ -103,12 +103,23 @@ class KickstartHelper
|
|||||||
protected function importZones()
|
protected function importZones()
|
||||||
{
|
{
|
||||||
$db = $this->db;
|
$db = $this->db;
|
||||||
|
$imports = array();
|
||||||
|
$objects = array();
|
||||||
|
|
||||||
foreach ($this->api()->setDb($db)->getZoneObjects() as $object) {
|
foreach ($this->api()->setDb($db)->getZoneObjects() as $object) {
|
||||||
if (! $object::exists($object->object_name, $db)) {
|
if (! $object::exists($object->object_name, $db)) {
|
||||||
|
$imports[$object->object_name] = $object->imports;
|
||||||
|
$object->imports = array();
|
||||||
|
$objects[$object->object_name] = $object;
|
||||||
$object->store();
|
$object->store();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach ($imports as $name => $imports) {
|
||||||
|
$objects[$name]->imports = $imports;
|
||||||
|
$objects[$name]->store();
|
||||||
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user