Requeue depending on producer

Browser import can requeue message from `parseEntry` but we should take care of the way import are handled (depending on the producer)
This commit is contained in:
Jeremy Benoist 2016-10-20 21:17:45 +02:00
parent 1e3d74a9cf
commit 5453500458
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C

View file

@ -139,12 +139,24 @@ abstract class BrowserImport extends AbstractImport
public function parseEntry(array $importedEntry)
{
if ((!array_key_exists('guid', $importedEntry) || (!array_key_exists('id', $importedEntry))) && is_array(reset($importedEntry))) {
if ($this->producer) {
$this->parseEntriesForProducer($importedEntry);
return;
}
$this->parseEntries($importedEntry);
return;
}
if (array_key_exists('children', $importedEntry)) {
if ($this->producer) {
$this->parseEntriesForProducer($importedEntry['children']);
return;
}
$this->parseEntries($importedEntry['children']);
return;