]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ImportBundle/Import/WallabagV1Import.php
Merge pull request #2667 from wallabag/upgrade-symfony-32
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Import / WallabagV1Import.php
index 8673465219a95035549c3b485521852507548290..59e3ce026c0ae6d76b79c5f9535d36be11ece5d1 100644 (file)
@@ -37,11 +37,10 @@ class WallabagV1Import extends WallabagImport
             'title' => $entry['title'],
             'html' => $entry['content'],
             'url' => $entry['url'],
-            'content_type' => '',
-            'language' => '',
             '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 +56,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;
     }
 }