aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-04-28 13:41:36 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2016-05-27 09:43:49 +0200
commit235026e2c708eea306a12f1cc1de3da38593db37 (patch)
tree99863eb1f5c21af87c73df6c642a2d28f698c432 /src
parent3fad6c74fe72b50bceb5f1c67c3f81370660634e (diff)
downloadwallabag-235026e2c708eea306a12f1cc1de3da38593db37.tar.gz
wallabag-235026e2c708eea306a12f1cc1de3da38593db37.tar.zst
wallabag-235026e2c708eea306a12f1cc1de3da38593db37.zip
Enhance option in command
Diffstat (limited to 'src')
-rw-r--r--src/Wallabag/ImportBundle/Command/ImportCommand.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Wallabag/ImportBundle/Command/ImportCommand.php b/src/Wallabag/ImportBundle/Command/ImportCommand.php
index f62176fc..a4aa8531 100644
--- a/src/Wallabag/ImportBundle/Command/ImportCommand.php
+++ b/src/Wallabag/ImportBundle/Command/ImportCommand.php
@@ -18,7 +18,7 @@ class ImportCommand extends ContainerAwareCommand
18 ->addArgument('userId', InputArgument::REQUIRED, 'User ID to populate') 18 ->addArgument('userId', InputArgument::REQUIRED, 'User ID to populate')
19 ->addArgument('filepath', InputArgument::REQUIRED, 'Path to the JSON file') 19 ->addArgument('filepath', InputArgument::REQUIRED, 'Path to the JSON file')
20 ->addOption('importer', null, InputArgument::OPTIONAL, 'The importer to use: v1 or v2', 'v1') 20 ->addOption('importer', null, InputArgument::OPTIONAL, 'The importer to use: v1 or v2', 'v1')
21 ->addOption('markAsRead', null, InputArgument::OPTIONAL, 'Mark all entries as read: true/false', false) 21 ->addOption('markAsRead', null, InputArgument::OPTIONAL, 'Mark all entries as read', false)
22 ; 22 ;
23 } 23 }
24 24
@@ -42,9 +42,7 @@ class ImportCommand extends ContainerAwareCommand
42 $wallabag = $this->getContainer()->get('wallabag_import.wallabag_v2.import'); 42 $wallabag = $this->getContainer()->get('wallabag_import.wallabag_v2.import');
43 } 43 }
44 44
45 if ('yes' === $input->getOption('markAsRead')) { 45 $wallabag->setMarkAsRead($input->getOption('markAsRead'));
46 $wallabag->setMarkAsRead(true);
47 }
48 46
49 $res = $wallabag 47 $res = $wallabag
50 ->setUser($user) 48 ->setUser($user)