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()) {
|
if (parent::hasBeenModified()) {
|
||||||
return true;
|
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()) {
|
if ($this->supportsCustomVars() && $this->vars !== null && $this->vars()->hasBeenModified()) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -552,6 +560,11 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function hasUnresolvedRelatedProperties()
|
||||||
|
{
|
||||||
|
return ! empty($this->unresolvedRelatedProperties);
|
||||||
|
}
|
||||||
|
|
||||||
protected function hasUnresolvedRelatedProperty($name)
|
protected function hasUnresolvedRelatedProperty($name)
|
||||||
{
|
{
|
||||||
return array_key_exists($name, $this->unresolvedRelatedProperties);
|
return array_key_exists($name, $this->unresolvedRelatedProperties);
|
||||||
|
|
Loading…
Reference in New Issue