IcingaObject: give unstored import names

This commit is contained in:
Thomas Gelf 2017-08-21 20:33:00 +02:00
parent c15a6e1a90
commit 6ba0e8e924
1 changed files with 14 additions and 1 deletions

View File

@ -497,6 +497,12 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
$this->resolveUnresolvedRelatedProperty($name); $this->resolveUnresolvedRelatedProperty($name);
} }
if ($this->supportsImports() && $this->imports !== null
&& $this->imports()->hasBeenModified()
) {
$this->imports()->getObjects();
}
return $this; return $this;
} }
@ -2613,7 +2619,14 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
public function listImportNames() public function listImportNames()
{ {
return $this->templateTree()->listParentNamesFor($this); if ($this->hasBeenModified()
&& $this->imports !== null
&& $this->imports()->hasBeenModified()
) {
return $this->imports()->listImportNames();
} else {
return $this->templateTree()->listParentNamesFor($this);
}
} }
public function listImportIds() public function listImportIds()