Sync: fix purge mechanism

This commit is contained in:
Thomas Gelf 2015-07-24 15:30:57 +02:00
parent f65e880aaa
commit f05fa90fee
1 changed files with 9 additions and 4 deletions

View File

@ -144,12 +144,17 @@ class Sync
}
if ($object->hasBeenLoadedFromDb() && $rule->purge_existing === 'y') {
/*
// TODO: Check against ALL sources
if (! array_key_exists($object->object_name, $imported[$sourceId])) {
$found = false;
foreach ($sources as $source) {
if (array_key_exists($object->object_name, $imported[$source->id])) {
$found = true;
break;
}
}
if (! $found) {
$object->delete();
}
*/
}
$object->store($db);
}