diff options
Diffstat (limited to 'src/Wallabag/ImportBundle/Import/ReadabilityImport.php')
-rw-r--r-- | src/Wallabag/ImportBundle/Import/ReadabilityImport.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/Wallabag/ImportBundle/Import/ReadabilityImport.php b/src/Wallabag/ImportBundle/Import/ReadabilityImport.php index 002b27f4..c5abf189 100644 --- a/src/Wallabag/ImportBundle/Import/ReadabilityImport.php +++ b/src/Wallabag/ImportBundle/Import/ReadabilityImport.php | |||
@@ -83,6 +83,18 @@ class ReadabilityImport extends AbstractImport | |||
83 | /** | 83 | /** |
84 | * {@inheritdoc} | 84 | * {@inheritdoc} |
85 | */ | 85 | */ |
86 | public function validateEntry(array $importedEntry) | ||
87 | { | ||
88 | if (empty($importedEntry['article__url'])) { | ||
89 | return false; | ||
90 | } | ||
91 | |||
92 | return true; | ||
93 | } | ||
94 | |||
95 | /** | ||
96 | * {@inheritdoc} | ||
97 | */ | ||
86 | public function parseEntry(array $importedEntry) | 98 | public function parseEntry(array $importedEntry) |
87 | { | 99 | { |
88 | $existingEntry = $this->em | 100 | $existingEntry = $this->em |
@@ -111,7 +123,7 @@ class ReadabilityImport extends AbstractImport | |||
111 | // update entry with content (in case fetching failed, the given entry will be return) | 123 | // update entry with content (in case fetching failed, the given entry will be return) |
112 | $this->fetchContent($entry, $data['url'], $data); | 124 | $this->fetchContent($entry, $data['url'], $data); |
113 | 125 | ||
114 | $entry->setArchived($data['is_archived']); | 126 | $entry->updateArchived($data['is_archived']); |
115 | $entry->setStarred($data['is_starred']); | 127 | $entry->setStarred($data['is_starred']); |
116 | $entry->setCreatedAt(new \DateTime($data['created_at'])); | 128 | $entry->setCreatedAt(new \DateTime($data['created_at'])); |
117 | 129 | ||