X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FImportBundle%2FImport%2FWallabagV1Import.php;h=59e3ce026c0ae6d76b79c5f9535d36be11ece5d1;hb=6fb06904ecde15b1b07d0a2af945338b416cf0e2;hp=6cf3467af59a1830481b0815507ffec921157aad;hpb=e2dda631529b1299b544d35bc3df1b59963a9d9b;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php index 6cf3467a..59e3ce02 100644 --- a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php +++ b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php @@ -31,17 +31,16 @@ class WallabagV1Import extends WallabagImport /** * {@inheritdoc} */ - protected function prepareEntry($entry = [], $markAsRead = false) + protected function prepareEntry($entry = []) { $data = [ 'title' => $entry['title'], 'html' => $entry['content'], 'url' => $entry['url'], - 'content_type' => '', - 'language' => '', - 'is_archived' => $entry['is_read'] || $markAsRead, + '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 @@ -56,4 +55,14 @@ class WallabagV1Import extends WallabagImport return $data; } + + /** + * {@inheritdoc} + */ + protected function setEntryAsRead(array $importedEntry) + { + $importedEntry['is_read'] = 1; + + return $importedEntry; + } }