aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ImportBundle/Import/WallabagV2Import.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@smile.fr>2016-02-05 13:50:16 +0100
committerNicolas LÅ“uillet <nicolas.loeuillet@smile.fr>2016-02-05 13:50:16 +0100
commitde3b19b2ce227202ab5e4442474441cc4ba10f0b (patch)
treeb34bfe8e0bdff5eba717d652bbecec08132952d2 /src/Wallabag/ImportBundle/Import/WallabagV2Import.php
parent704ed658a990fee64cf8752beedcfbf30f8a5406 (diff)
downloadwallabag-de3b19b2ce227202ab5e4442474441cc4ba10f0b.tar.gz
wallabag-de3b19b2ce227202ab5e4442474441cc4ba10f0b.tar.zst
wallabag-de3b19b2ce227202ab5e4442474441cc4ba10f0b.zip
Test if some keys are missing in v2 import
Diffstat (limited to 'src/Wallabag/ImportBundle/Import/WallabagV2Import.php')
-rw-r--r--src/Wallabag/ImportBundle/Import/WallabagV2Import.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/Wallabag/ImportBundle/Import/WallabagV2Import.php b/src/Wallabag/ImportBundle/Import/WallabagV2Import.php
index 979c671e..c5c0d5a7 100644
--- a/src/Wallabag/ImportBundle/Import/WallabagV2Import.php
+++ b/src/Wallabag/ImportBundle/Import/WallabagV2Import.php
@@ -56,9 +56,15 @@ class WallabagV2Import extends WallabagV1Import implements ImportInterface
56 $entry->setContent($importedEntry['content']); 56 $entry->setContent($importedEntry['content']);
57 $entry->setReadingTime($importedEntry['reading_time']); 57 $entry->setReadingTime($importedEntry['reading_time']);
58 $entry->setDomainName($importedEntry['domain_name']); 58 $entry->setDomainName($importedEntry['domain_name']);
59 $entry->setMimetype($importedEntry['mimetype']); 59 if (isset($importedEntry['mimetype'])) {
60 $entry->setLanguage($importedEntry['language']); 60 $entry->setMimetype($importedEntry['mimetype']);
61 $entry->setPreviewPicture($importedEntry['preview_picture']); 61 }
62 if (isset($importedEntry['language'])) {
63 $entry->setLanguage($importedEntry['language']);
64 }
65 if (isset($importedEntry['preview_picture'])) {
66 $entry->setPreviewPicture($importedEntry['preview_picture']);
67 }
62 68
63 $this->em->persist($entry); 69 $this->em->persist($entry);
64 ++$this->importedEntries; 70 ++$this->importedEntries;