mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-27 07:44:05 +02:00
Sync: fix purge mechanism
This commit is contained in:
parent
f65e880aaa
commit
f05fa90fee
@ -144,12 +144,17 @@ class Sync
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($object->hasBeenLoadedFromDb() && $rule->purge_existing === 'y') {
|
if ($object->hasBeenLoadedFromDb() && $rule->purge_existing === 'y') {
|
||||||
/*
|
$found = false;
|
||||||
// TODO: Check against ALL sources
|
foreach ($sources as $source) {
|
||||||
if (! array_key_exists($object->object_name, $imported[$sourceId])) {
|
if (array_key_exists($object->object_name, $imported[$source->id])) {
|
||||||
|
$found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! $found) {
|
||||||
$object->delete();
|
$object->delete();
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
$object->store($db);
|
$object->store($db);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user