X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FImportBundle%2FImport%2FFirefoxImport.php;h=8999e3f3932240accb4096b519af13a31230bdbc;hb=9f8f188d928b47503d39348c5990379a572b570a;hp=d3f997703f0170f784a8f3a59783a5a20d6b0756;hpb=4a1f963531f04427f625f58bda45723c6e69a87c;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/ImportBundle/Import/FirefoxImport.php b/src/Wallabag/ImportBundle/Import/FirefoxImport.php index d3f99770..8999e3f3 100644 --- a/src/Wallabag/ImportBundle/Import/FirefoxImport.php +++ b/src/Wallabag/ImportBundle/Import/FirefoxImport.php @@ -30,6 +30,18 @@ class FirefoxImport extends BrowserImport return 'import.firefox.description'; } + /** + * {@inheritdoc} + */ + public function validateEntry(array $importedEntry) + { + if (empty($importedEntry['uri'])) { + return false; + } + + return true; + } + /** * {@inheritdoc} */ @@ -39,12 +51,13 @@ class FirefoxImport extends BrowserImport 'title' => $entry['title'], 'html' => false, 'url' => $entry['uri'], - 'is_archived' => $this->markAsRead, + 'is_archived' => (int) $this->markAsRead, + 'is_starred' => false, 'tags' => '', 'created_at' => substr($entry['dateAdded'], 0, 10), ]; - if (array_key_exists('tags', $entry) && $entry['tags'] != '') { + if (array_key_exists('tags', $entry) && '' !== $entry['tags']) { $data['tags'] = $entry['tags']; }