mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-09-26 03:09:11 +02:00
parent
61f3ffff7e
commit
98acba9fb4
@ -749,6 +749,11 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
||||
return $this->imports;
|
||||
}
|
||||
|
||||
public function gotImports()
|
||||
{
|
||||
return $this->imports !== null;
|
||||
}
|
||||
|
||||
public function setImports($imports)
|
||||
{
|
||||
if (! is_array($imports) && $imports !== null) {
|
||||
|
@ -79,8 +79,16 @@ class IcingaTemplateResolver
|
||||
$this->requireTemplates();
|
||||
|
||||
if ($id === null) {
|
||||
$id = $this->object->id;
|
||||
if (! $id && $this->object->imports()->hasBeenModified()) {
|
||||
$object = $this->object;
|
||||
|
||||
if ($object->hasBeenLoadedFromDb()) {
|
||||
|
||||
if ($object->gotImports() && $object->imports()->hasBeenModified()) {
|
||||
return $this->listUnstoredParentIds();
|
||||
}
|
||||
|
||||
$id = $object->id;
|
||||
} else {
|
||||
return $this->listUnstoredParentIds();
|
||||
}
|
||||
}
|
||||
@ -210,7 +218,7 @@ class IcingaTemplateResolver
|
||||
|
||||
protected function getIdsForNames($names)
|
||||
{
|
||||
$id = array();
|
||||
$ids = array();
|
||||
foreach ($names as $name) {
|
||||
$ids[] = $this->getIdForName($name);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user