]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ImportBundle/Import/WallabagV1Import.php
Merge remote-tracking branch 'origin/master' into 2.1
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Import / WallabagV1Import.php
index 8673465219a95035549c3b485521852507548290..4f0010624d047131046697f7929f7baf632e16ab 100644 (file)
@@ -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;
     }
 }