Skip to content

Commit

Permalink
IcingaHostGroup(Legacy): Load zones prefetched
Browse files Browse the repository at this point in the history
refs #13049
  • Loading branch information
lazyfrosch authored and Thomas-Gelf committed Nov 30, 2016
1 parent c2734fd commit 4a838ca
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions library/Director/Objects/IcingaHostGroup.php
Expand Up @@ -61,10 +61,9 @@ protected function renderLegacyApplyToConfig(IcingaConfig $config)

// 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 (IcingaObject::loadAllByType('zone', $conn) as $zone) {
if (! array_key_exists($zone->id, $zoneMap)) {
$zoneMap[$zone->id] = array();
}
}

Expand Down

0 comments on commit 4a838ca

Please sign in to comment.