IcingaObject: fix inheritance blacklist application

This commit is contained in:
Thomas Gelf 2015-12-10 17:56:02 +01:00
parent ab597ba958
commit d0359683cd
1 changed files with 3 additions and 2 deletions

View File

@ -403,10 +403,12 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
$getInherited = 'getInherited' . $what;
$getOrigins = 'getOrigins' . $what;
$blacklist = array('id', 'object_type', 'object_name');
foreach ($objects as $name => $object) {
$origins = $object->$getOrigins();
foreach ($object->$getInherited() as $key => $value) {
if (in_array($key, $blacklist)) continue;
// $vals[$name]->$key = $value;
$vals['_MERGED_']->$key = $value;
$vals['_INHERITED_']->$key = $value;
@ -415,16 +417,15 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
foreach ($object->$get() as $key => $value) {
if ($value === null) continue;
if (in_array($key, $blacklist)) continue;
$vals['_MERGED_']->$key = $value;
$vals['_INHERITED_']->$key = $value;
$vals['_ORIGINS_']->$key = $name;
}
}
$blacklist = array('id', 'object_type', 'object_name');
foreach ($this->$get() as $key => $value) {
if ($value === null) continue;
if (in_array($key, $blacklist)) continue;
// $vals[$this->object_name]->$key = $value;
$vals['_MERGED_']->$key = $value;