mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 00:34:05 +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());
|
||||
if (empty($this->objects)) {
|
||||
Benchmark::measure('Nothing to check, got no qualified object');
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@ -509,11 +508,11 @@ abstract class GroupMembershipResolver
|
||||
$staticGroups = [];
|
||||
|
||||
if ($this->objects === null) {
|
||||
$objects = $this->fetchAllObjects();
|
||||
} else {
|
||||
$objects = & $this->objects;
|
||||
$this->objects = $this->fetchAllObjects();
|
||||
}
|
||||
|
||||
$objects = & $this->objects;
|
||||
|
||||
$times = array();
|
||||
|
||||
foreach ($objects as $object) {
|
||||
@ -527,7 +526,6 @@ abstract class GroupMembershipResolver
|
||||
$mt = microtime(true);
|
||||
$id = $object->get('id');
|
||||
|
||||
// TODO: fix this last hard host dependency
|
||||
DynamicApplyMatches::setType($this->type);
|
||||
$resolver = DynamicApplyMatches::prepare($object);
|
||||
foreach ($groups as $groupId => $filter) {
|
||||
@ -535,7 +533,6 @@ abstract class GroupMembershipResolver
|
||||
if (! array_key_exists($groupId, $mappings)) {
|
||||
$mappings[$groupId] = [];
|
||||
}
|
||||
|
||||
$mappings[$groupId][$id] = $id;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user