X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FImportBundle%2FImport%2FReadabilityImport.php;h=a5f3798e0277f05b4167c6318be47a9cb5d603b7;hb=9f8f188d928b47503d39348c5990379a572b570a;hp=66b00885094ee832ba601a4802de2362ad09b97e;hpb=36e6ef52a176ef654eade931a23f60fd91344f2f;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/ImportBundle/Import/ReadabilityImport.php b/src/Wallabag/ImportBundle/Import/ReadabilityImport.php index 66b00885..a5f3798e 100644 --- a/src/Wallabag/ImportBundle/Import/ReadabilityImport.php +++ b/src/Wallabag/ImportBundle/Import/ReadabilityImport.php @@ -80,6 +80,18 @@ class ReadabilityImport extends AbstractImport return true; } + /** + * {@inheritdoc} + */ + public function validateEntry(array $importedEntry) + { + if (empty($importedEntry['article__url'])) { + return false; + } + + return true; + } + /** * {@inheritdoc} */ @@ -98,8 +110,6 @@ class ReadabilityImport extends AbstractImport $data = [ 'title' => $importedEntry['article__title'], 'url' => $importedEntry['article__url'], - 'content_type' => '', - 'language' => '', 'is_archived' => $importedEntry['archive'] || $this->markAsRead, 'is_starred' => $importedEntry['favorite'], 'created_at' => $importedEntry['date_added'], @@ -111,7 +121,7 @@ class ReadabilityImport extends AbstractImport $entry->setTitle($data['title']); // update entry with content (in case fetching failed, the given entry will be return) - $entry = $this->fetchContent($entry, $data['url'], $data); + $this->fetchContent($entry, $data['url'], $data); $entry->setArchived($data['is_archived']); $entry->setStarred($data['is_starred']);