X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FImportBundle%2FImport%2FInstapaperImport.php;h=439c978c71f02a6d4953cf25e7475b2a9a63582a;hb=3527c300215e6e6010efb8bb840b8b6f5c63a1cc;hp=e113ba00824a75c07f07f142fea311a415a07c34;hpb=7975395d10bb381de8cd15b5ee15198318af6d55;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/ImportBundle/Import/InstapaperImport.php b/src/Wallabag/ImportBundle/Import/InstapaperImport.php index e113ba00..439c978c 100644 --- a/src/Wallabag/ImportBundle/Import/InstapaperImport.php +++ b/src/Wallabag/ImportBundle/Import/InstapaperImport.php @@ -62,7 +62,7 @@ class InstapaperImport extends AbstractImport } $entries = []; - $handle = fopen($this->filepath, 'rb'); + $handle = fopen($this->filepath, 'r'); while (false !== ($data = fgetcsv($handle, 10240))) { if ('URL' === $data[0]) { continue; @@ -79,7 +79,6 @@ class InstapaperImport extends AbstractImport $entries[] = [ 'url' => $data[0], 'title' => $data[1], - 'status' => $data[3], 'is_archived' => 'Archive' === $data[3] || 'Starred' === $data[3], 'is_starred' => 'Starred' === $data[3], 'html' => false, @@ -105,6 +104,18 @@ class InstapaperImport extends AbstractImport return true; } + /** + * {@inheritdoc} + */ + public function validateEntry(array $importedEntry) + { + if (empty($importedEntry['url'])) { + return false; + } + + return true; + } + /** * {@inheritdoc} */