From 54535004587693952f4aef5ee5798298f4cda7fa Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Thu, 20 Oct 2016 21:17:45 +0200 Subject: [PATCH] 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) --- src/Wallabag/ImportBundle/Import/BrowserImport.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Wallabag/ImportBundle/Import/BrowserImport.php b/src/Wallabag/ImportBundle/Import/BrowserImport.php index 9d75685b..2ca1683b 100644 --- a/src/Wallabag/ImportBundle/Import/BrowserImport.php +++ b/src/Wallabag/ImportBundle/Import/BrowserImport.php @@ -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; -- 2.41.0