]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Requeue depending on producer
authorJeremy Benoist <jeremy.benoist@gmail.com>
Thu, 20 Oct 2016 19:17:45 +0000 (21:17 +0200)
committerJeremy Benoist <jeremy.benoist@gmail.com>
Thu, 20 Oct 2016 19:17:45 +0000 (21:17 +0200)
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

index 9d75685b74d84aa13c9d90d9672b5893f271f2fd..2ca1683b1688b33ff7c9e203e635b0bb83b09f7a 100644 (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;