X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FImportBundle%2FImport%2FWallabagV1Import.php;h=4f0010624d047131046697f7929f7baf632e16ab;hb=ae669126e718ede5dbf76929215d8514cd960976;hp=8673465219a95035549c3b485521852507548290;hpb=c98db1b653b5dc8b701422190b02d9fbf10c4e68;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php index 86734652..4f001062 100644 --- a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php +++ b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php @@ -42,6 +42,7 @@ class WallabagV1Import extends WallabagImport 'is_archived' => $entry['is_read'] || $this->markAsRead, 'is_starred' => $entry['is_fav'], 'tags' => '', + 'created_at' => '', ]; // force content to be refreshed in case on bad fetch in the v1 installation @@ -57,19 +58,13 @@ class WallabagV1Import extends WallabagImport return $data; } - protected function parseEntriesForProducer($entries) + /** + * {@inheritdoc} + */ + protected function setEntryAsRead(array $importedEntry) { - foreach ($entries as $importedEntry) { - // set userId for the producer (it won't know which user is connected) - $importedEntry['userId'] = $this->user->getId(); + $importedEntry['is_read'] = 1; - if ($this->markAsRead) { - $importedEntry['is_read'] = 1; - } - - ++$this->importedEntries; - - $this->producer->publish(json_encode($importedEntry)); - } + return $importedEntry; } }