From: Jeremy Benoist Date: Thu, 20 Oct 2016 19:17:45 +0000 (+0200) Subject: Requeue depending on producer X-Git-Tag: 2.1.3~25^2~4 X-Git-Url: https://git.immae.eu/?p=github%2Fwallabag%2Fwallabag.git;a=commitdiff_plain;h=54535004587693952f4aef5ee5798298f4cda7fa 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) --- 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;