diff options
Diffstat (limited to 'src/Wallabag/ImportBundle/Import/WallabagV1Import.php')
-rw-r--r-- | src/Wallabag/ImportBundle/Import/WallabagV1Import.php | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php index 86734652..292b72a7 100644 --- a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php +++ b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php | |||
@@ -57,19 +57,13 @@ class WallabagV1Import extends WallabagImport | |||
57 | return $data; | 57 | return $data; |
58 | } | 58 | } |
59 | 59 | ||
60 | protected function parseEntriesForProducer($entries) | 60 | /** |
61 | * {@inheritdoc} | ||
62 | */ | ||
63 | protected function setEntryAsRead(array $importedEntry) | ||
61 | { | 64 | { |
62 | foreach ($entries as $importedEntry) { | 65 | $importedEntry['is_read'] = 1; |
63 | // set userId for the producer (it won't know which user is connected) | ||
64 | $importedEntry['userId'] = $this->user->getId(); | ||
65 | 66 | ||
66 | if ($this->markAsRead) { | 67 | return $importedEntry; |
67 | $importedEntry['is_read'] = 1; | ||
68 | } | ||
69 | |||
70 | ++$this->importedEntries; | ||
71 | |||
72 | $this->producer->publish(json_encode($importedEntry)); | ||
73 | } | ||
74 | } | 68 | } |
75 | } | 69 | } |