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