]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ImportBundle/Import/WallabagV1Import.php
Merge pull request #2416 from wallabag/2.2
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Import / WallabagV1Import.php
index 6cf3467af59a1830481b0815507ffec921157aad..59e3ce026c0ae6d76b79c5f9535d36be11ece5d1 100644 (file)
@@ -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;
+    }
 }