diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-10-24 12:03:17 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-10-24 12:03:17 +0200 |
commit | 64a8781e453c40ff144d03405abe2dc1ccfacbe0 (patch) | |
tree | 311473a357e3dedd496e1417293eed9a2a116ad6 /src/Wallabag/ImportBundle | |
parent | 9313ea9d440e3f93a6bb2d8c0fb6717364cd27f5 (diff) | |
parent | c64b4941d5222586a82d2c8d6a61969bb9cfe96b (diff) | |
download | wallabag-64a8781e453c40ff144d03405abe2dc1ccfacbe0.tar.gz wallabag-64a8781e453c40ff144d03405abe2dc1ccfacbe0.tar.zst wallabag-64a8781e453c40ff144d03405abe2dc1ccfacbe0.zip |
Merge remote-tracking branch 'origin/master' into 2.2
Diffstat (limited to 'src/Wallabag/ImportBundle')
-rw-r--r-- | src/Wallabag/ImportBundle/Consumer/AbstractConsumer.php | 5 | ||||
-rw-r--r-- | src/Wallabag/ImportBundle/Import/BrowserImport.php | 12 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/Wallabag/ImportBundle/Consumer/AbstractConsumer.php b/src/Wallabag/ImportBundle/Consumer/AbstractConsumer.php index 2b85ad76..b893ea29 100644 --- a/src/Wallabag/ImportBundle/Consumer/AbstractConsumer.php +++ b/src/Wallabag/ImportBundle/Consumer/AbstractConsumer.php | |||
@@ -50,9 +50,10 @@ abstract class AbstractConsumer | |||
50 | $entry = $this->import->parseEntry($storedEntry); | 50 | $entry = $this->import->parseEntry($storedEntry); |
51 | 51 | ||
52 | if (null === $entry) { | 52 | if (null === $entry) { |
53 | $this->logger->warning('Unable to parse entry', ['entry' => $storedEntry]); | 53 | $this->logger->warning('Entry already exists', ['entry' => $storedEntry]); |
54 | 54 | ||
55 | return false; | 55 | // return true to skip message |
56 | return true; | ||
56 | } | 57 | } |
57 | 58 | ||
58 | try { | 59 | try { |
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; |