diff options
Diffstat (limited to 'src/Wallabag/ImportBundle/Import/PocketImport.php')
-rw-r--r-- | src/Wallabag/ImportBundle/Import/PocketImport.php | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/Wallabag/ImportBundle/Import/PocketImport.php b/src/Wallabag/ImportBundle/Import/PocketImport.php index 06a31813..5850deba 100644 --- a/src/Wallabag/ImportBundle/Import/PocketImport.php +++ b/src/Wallabag/ImportBundle/Import/PocketImport.php | |||
@@ -29,7 +29,7 @@ class PocketImport extends AbstractImport | |||
29 | } | 29 | } |
30 | 30 | ||
31 | /** | 31 | /** |
32 | * Only used for test purpose | 32 | * Only used for test purpose. |
33 | * | 33 | * |
34 | * @return string | 34 | * @return string |
35 | */ | 35 | */ |
@@ -258,24 +258,12 @@ class PocketImport extends AbstractImport | |||
258 | } | 258 | } |
259 | 259 | ||
260 | /** | 260 | /** |
261 | * Faster parse entries for Producer. | 261 | * {@inheritdoc} |
262 | * We don't care to make check at this time. They'll be done by the consumer. | ||
263 | * | ||
264 | * @param array $entries | ||
265 | */ | 262 | */ |
266 | public function parseEntriesForProducer($entries) | 263 | protected function setEntryAsRead(array $importedEntry) |
267 | { | 264 | { |
268 | foreach ($entries as $importedEntry) { | 265 | $importedEntry['status'] = 1; |
269 | // set userId for the producer (it won't know which user is connected) | ||
270 | $importedEntry['userId'] = $this->user->getId(); | ||
271 | |||
272 | if ($this->markAsRead) { | ||
273 | $importedEntry['status'] = 1; | ||
274 | } | ||
275 | 266 | ||
276 | ++$this->importedEntries; | 267 | return $importedEntry; |
277 | |||
278 | $this->producer->publish(json_encode($importedEntry)); | ||
279 | } | ||
280 | } | 268 | } |
281 | } | 269 | } |