mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 16:54:06 +02:00
Fixed bug in GroupMembershipResolver, objects not stored to instance if loading all objects causing mappings to not be stored.
This commit is contained in:
parent
2efd90302c
commit
fcd4125d71
@ -85,7 +85,6 @@ abstract class GroupMembershipResolver
|
|||||||
$this->recheckAllObjects($this->getAppliedGroups());
|
$this->recheckAllObjects($this->getAppliedGroups());
|
||||||
if (empty($this->objects)) {
|
if (empty($this->objects)) {
|
||||||
Benchmark::measure('Nothing to check, got no qualified object');
|
Benchmark::measure('Nothing to check, got no qualified object');
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -509,11 +508,11 @@ abstract class GroupMembershipResolver
|
|||||||
$staticGroups = [];
|
$staticGroups = [];
|
||||||
|
|
||||||
if ($this->objects === null) {
|
if ($this->objects === null) {
|
||||||
$objects = $this->fetchAllObjects();
|
$this->objects = $this->fetchAllObjects();
|
||||||
} else {
|
|
||||||
$objects = & $this->objects;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$objects = & $this->objects;
|
||||||
|
|
||||||
$times = array();
|
$times = array();
|
||||||
|
|
||||||
foreach ($objects as $object) {
|
foreach ($objects as $object) {
|
||||||
@ -527,7 +526,6 @@ abstract class GroupMembershipResolver
|
|||||||
$mt = microtime(true);
|
$mt = microtime(true);
|
||||||
$id = $object->get('id');
|
$id = $object->get('id');
|
||||||
|
|
||||||
// TODO: fix this last hard host dependency
|
|
||||||
DynamicApplyMatches::setType($this->type);
|
DynamicApplyMatches::setType($this->type);
|
||||||
$resolver = DynamicApplyMatches::prepare($object);
|
$resolver = DynamicApplyMatches::prepare($object);
|
||||||
foreach ($groups as $groupId => $filter) {
|
foreach ($groups as $groupId => $filter) {
|
||||||
@ -535,7 +533,6 @@ abstract class GroupMembershipResolver
|
|||||||
if (! array_key_exists($groupId, $mappings)) {
|
if (! array_key_exists($groupId, $mappings)) {
|
||||||
$mappings[$groupId] = [];
|
$mappings[$groupId] = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$mappings[$groupId][$id] = $id;
|
$mappings[$groupId][$id] = $id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user