IcingaObject: check for modified properties...
...once again after resolving unresolved related properties. fixes #1315
This commit is contained in:
parent
13eac58290
commit
5d52eaefd0
|
@ -512,7 +512,15 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
|||
if (parent::hasBeenModified()) {
|
||||
return true;
|
||||
}
|
||||
$this->resolveUnresolvedRelatedProperties();
|
||||
|
||||
if ($this->hasUnresolvedRelatedProperties()) {
|
||||
$this->resolveUnresolvedRelatedProperties();
|
||||
|
||||
// Duplicates above code, but this makes it faster:
|
||||
if (parent::hasBeenModified()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->supportsCustomVars() && $this->vars !== null && $this->vars()->hasBeenModified()) {
|
||||
return true;
|
||||
|
@ -552,6 +560,11 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
|||
return false;
|
||||
}
|
||||
|
||||
protected function hasUnresolvedRelatedProperties()
|
||||
{
|
||||
return ! empty($this->unresolvedRelatedProperties);
|
||||
}
|
||||
|
||||
protected function hasUnresolvedRelatedProperty($name)
|
||||
{
|
||||
return array_key_exists($name, $this->unresolvedRelatedProperties);
|
||||
|
|
Loading…
Reference in New Issue