IcingaObject: ask imports for name list...

...when we already have it available
This commit is contained in:
Thomas Gelf 2017-08-27 18:08:18 +02:00
parent 396d8399ee
commit 2f1d963c1c

View File

@ -2633,10 +2633,7 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
public function listImportNames() public function listImportNames()
{ {
if ($this->hasBeenModified() if ($this->gotImports()) {
&& $this->imports !== null
&& $this->imports()->hasBeenModified()
) {
return $this->imports()->listImportNames(); return $this->imports()->listImportNames();
} else { } else {
return $this->templateTree()->listParentNamesFor($this); return $this->templateTree()->listParentNamesFor($this);