diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-10-20 21:17:45 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-10-20 21:17:45 +0200 |
commit | 54535004587693952f4aef5ee5798298f4cda7fa (patch) | |
tree | 2f83a5d109e09d6344ccd17d7f06ba78ce9748a4 /src | |
parent | 1e3d74a9cfdaf708632a97660e1811dd819f7df4 (diff) | |
download | wallabag-54535004587693952f4aef5ee5798298f4cda7fa.tar.gz wallabag-54535004587693952f4aef5ee5798298f4cda7fa.tar.zst wallabag-54535004587693952f4aef5ee5798298f4cda7fa.zip |
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)
Diffstat (limited to 'src')
-rw-r--r-- | src/Wallabag/ImportBundle/Import/BrowserImport.php | 12 |
1 files changed, 12 insertions, 0 deletions
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 | |||
139 | public function parseEntry(array $importedEntry) | 139 | public function parseEntry(array $importedEntry) |
140 | { | 140 | { |
141 | if ((!array_key_exists('guid', $importedEntry) || (!array_key_exists('id', $importedEntry))) && is_array(reset($importedEntry))) { | 141 | if ((!array_key_exists('guid', $importedEntry) || (!array_key_exists('id', $importedEntry))) && is_array(reset($importedEntry))) { |
142 | if ($this->producer) { | ||
143 | $this->parseEntriesForProducer($importedEntry); | ||
144 | |||
145 | return; | ||
146 | } | ||
147 | |||
142 | $this->parseEntries($importedEntry); | 148 | $this->parseEntries($importedEntry); |
143 | 149 | ||
144 | return; | 150 | return; |
145 | } | 151 | } |
146 | 152 | ||
147 | if (array_key_exists('children', $importedEntry)) { | 153 | if (array_key_exists('children', $importedEntry)) { |
154 | if ($this->producer) { | ||
155 | $this->parseEntriesForProducer($importedEntry['children']); | ||
156 | |||
157 | return; | ||
158 | } | ||
159 | |||
148 | $this->parseEntries($importedEntry['children']); | 160 | $this->parseEntries($importedEntry['children']); |
149 | 161 | ||
150 | return; | 162 | return; |