diff options
Diffstat (limited to 'src/Wallabag/ImportBundle/Import/WallabagV1Import.php')
-rw-r--r-- | src/Wallabag/ImportBundle/Import/WallabagV1Import.php | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php index 6cf3467a..4f001062 100644 --- a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php +++ b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php | |||
@@ -31,7 +31,7 @@ class WallabagV1Import extends WallabagImport | |||
31 | /** | 31 | /** |
32 | * {@inheritdoc} | 32 | * {@inheritdoc} |
33 | */ | 33 | */ |
34 | protected function prepareEntry($entry = [], $markAsRead = false) | 34 | protected function prepareEntry($entry = []) |
35 | { | 35 | { |
36 | $data = [ | 36 | $data = [ |
37 | 'title' => $entry['title'], | 37 | 'title' => $entry['title'], |
@@ -39,9 +39,10 @@ class WallabagV1Import extends WallabagImport | |||
39 | 'url' => $entry['url'], | 39 | 'url' => $entry['url'], |
40 | 'content_type' => '', | 40 | 'content_type' => '', |
41 | 'language' => '', | 41 | 'language' => '', |
42 | 'is_archived' => $entry['is_read'] || $markAsRead, | 42 | 'is_archived' => $entry['is_read'] || $this->markAsRead, |
43 | 'is_starred' => $entry['is_fav'], | 43 | 'is_starred' => $entry['is_fav'], |
44 | 'tags' => '', | 44 | 'tags' => '', |
45 | 'created_at' => '', | ||
45 | ]; | 46 | ]; |
46 | 47 | ||
47 | // force content to be refreshed in case on bad fetch in the v1 installation | 48 | // force content to be refreshed in case on bad fetch in the v1 installation |
@@ -56,4 +57,14 @@ class WallabagV1Import extends WallabagImport | |||
56 | 57 | ||
57 | return $data; | 58 | return $data; |
58 | } | 59 | } |
60 | |||
61 | /** | ||
62 | * {@inheritdoc} | ||
63 | */ | ||
64 | protected function setEntryAsRead(array $importedEntry) | ||
65 | { | ||
66 | $importedEntry['is_read'] = 1; | ||
67 | |||
68 | return $importedEntry; | ||
69 | } | ||
59 | } | 70 | } |