X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FImportBundle%2FImport%2FPinboardImport.php;h=202eb1b3e30ee640a8788a0aae065305a66a9c8f;hb=9f0957b831622ee577fa7d8f92ec0df6f3a8e274;hp=d9865534ae8fe08a8e5d6d47ec90d595b19b6c0e;hpb=339b1e689d96b433d88ca1ad2325031841ae450d;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/ImportBundle/Import/PinboardImport.php b/src/Wallabag/ImportBundle/Import/PinboardImport.php index d9865534..202eb1b3 100644 --- a/src/Wallabag/ImportBundle/Import/PinboardImport.php +++ b/src/Wallabag/ImportBundle/Import/PinboardImport.php @@ -80,6 +80,18 @@ class PinboardImport extends AbstractImport return true; } + /** + * {@inheritdoc} + */ + public function validateEntry(array $importedEntry) + { + if (empty($importedEntry['href'])) { + return false; + } + + return true; + } + /** * {@inheritdoc} */ @@ -109,17 +121,17 @@ class PinboardImport 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); if (!empty($data['tags'])) { - $this->contentProxy->assignTagsToEntry( + $this->tagsAssigner->assignTagsToEntry( $entry, $data['tags'], $this->em->getUnitOfWork()->getScheduledEntityInsertions() ); } - $entry->setArchived($data['is_archived']); + $entry->updateArchived($data['is_archived']); $entry->setStarred($data['is_starred']); $entry->setCreatedAt(new \DateTime($data['created_at']));