aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ImportBundle/Import/PocketImport.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/ImportBundle/Import/PocketImport.php')
-rw-r--r--src/Wallabag/ImportBundle/Import/PocketImport.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Wallabag/ImportBundle/Import/PocketImport.php b/src/Wallabag/ImportBundle/Import/PocketImport.php
index 1710d9d3..aeccc7bd 100644
--- a/src/Wallabag/ImportBundle/Import/PocketImport.php
+++ b/src/Wallabag/ImportBundle/Import/PocketImport.php
@@ -141,7 +141,7 @@ class PocketImport implements ImportInterface
141 141
142 $entries = $response->json(); 142 $entries = $response->json();
143 143
144 $this->parsePocketEntries($entries['list']); 144 $this->parseEntries($entries['list']);
145 145
146 return true; 146 return true;
147 } 147 }
@@ -194,11 +194,9 @@ class PocketImport implements ImportInterface
194 * 194 *
195 * @param $entries 195 * @param $entries
196 */ 196 */
197 private function parsePocketEntries($entries) 197 private function parseEntries($entries)
198 { 198 {
199 foreach ($entries as $pocketEntry) { 199 foreach ($entries as $pocketEntry) {
200 $entry = new Entry($this->user);
201
202 $url = isset($pocketEntry['resolved_url']) && $pocketEntry['resolved_url'] != '' ? $pocketEntry['resolved_url'] : $pocketEntry['given_url']; 200 $url = isset($pocketEntry['resolved_url']) && $pocketEntry['resolved_url'] != '' ? $pocketEntry['resolved_url'] : $pocketEntry['given_url'];
203 201
204 $existingEntry = $this->em 202 $existingEntry = $this->em
@@ -210,6 +208,7 @@ class PocketImport implements ImportInterface
210 continue; 208 continue;
211 } 209 }
212 210
211 $entry = new Entry($this->user);
213 $entry = $this->contentProxy->updateEntry($entry, $url); 212 $entry = $this->contentProxy->updateEntry($entry, $url);
214 213
215 // 0, 1, 2 - 1 if the item is archived - 2 if the item should be deleted 214 // 0, 1, 2 - 1 if the item is archived - 2 if the item should be deleted