IcingaHostGroup(Legacy): Render assigned groups to all zones

So we still can support hosts with direct groups.

refs #13049
This commit is contained in:
Markus Frosch 2016-11-15 14:39:41 +01:00 committed by Thomas Gelf
parent aaeca533fc
commit c2734fd4d4

View File

@ -59,6 +59,15 @@ class IcingaHostGroup extends IcingaObjectGroup
} else {
$allMembers = array();
// make sure we write to all zones
// so host -> group relations are still possible
foreach (IcingaZone::loadAll($conn) as $zone) {
$zoneId = $zone->getAutoincId();
if (! array_key_exists($zoneId, $zoneMap)) {
$zoneMap[$zoneId] = array();
}
}
foreach ($zoneMap as $zoneId => $members) {
$file = $this->legacyZoneHostgroupFile($config, $zoneId);
$this->properties['members'] = $members;