From c10fcb3bbbd4ef14edd9a862ee18c895d92e30ae Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Sat, 13 Feb 2016 14:32:16 +0100 Subject: french translation & pocket --- src/Wallabag/ImportBundle/Import/PocketImport.php | 24 ++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'src/Wallabag/ImportBundle/Import/PocketImport.php') diff --git a/src/Wallabag/ImportBundle/Import/PocketImport.php b/src/Wallabag/ImportBundle/Import/PocketImport.php index 5dfd098c..1cc03d5b 100644 --- a/src/Wallabag/ImportBundle/Import/PocketImport.php +++ b/src/Wallabag/ImportBundle/Import/PocketImport.php @@ -22,6 +22,7 @@ class PocketImport implements ImportInterface private $consumerKey; private $skippedEntries = 0; private $importedEntries = 0; + private $markAsRead; protected $accessToken; public function __construct(TokenStorageInterface $tokenStorage, EntityManager $em, ContentProxy $contentProxy, Config $craueConfig) @@ -123,6 +124,27 @@ class PocketImport implements ImportInterface return true; } + + /** + * Set whether articles must be all marked as read. + * + * @param bool $markAsRead + */ + public function setMarkAsRead($markAsRead) + { + $this->markAsRead = $markAsRead; + + return $this; + } + + /** + * Get whether articles must be all marked as read. + */ + public function getRead() + { + return $this->markAsRead; + } + /** * {@inheritdoc} */ @@ -201,7 +223,7 @@ class PocketImport implements ImportInterface $entry = $this->contentProxy->updateEntry($entry, $url); // 0, 1, 2 - 1 if the item is archived - 2 if the item should be deleted - if ($pocketEntry['status'] == 1) { + if ($pocketEntry['status'] == 1 | $this->markAsRead) { $entry->setArchived(true); } -- cgit v1.2.3