]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ImportBundle/Import/WallabagImport.php
Retrieve created date from Pocket
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Import / WallabagImport.php
index 8e18e0ef498a1bff16e430b6380fde3dd4d78c08..8e50b135a980a522feda860773671339250a35ad 100644 (file)
@@ -6,8 +6,6 @@ use Wallabag\CoreBundle\Entity\Entry;
 
 abstract class WallabagImport extends AbstractImport
 {
-    protected $skippedEntries = 0;
-    protected $importedEntries = 0;
     protected $filepath;
     // untitled in all languages from v1
     protected $untitled = [
@@ -141,6 +139,10 @@ abstract class WallabagImport extends AbstractImport
         $entry->setArchived($data['is_archived']);
         $entry->setStarred($data['is_starred']);
 
+        if (!empty($data['created_at'])) {
+            $entry->setCreatedAt(new \DateTime($data['created_at']));
+        }
+
         $this->em->persist($entry);
         ++$this->importedEntries;