mirror of
https://github.com/wallabag/wallabag.git
synced 2025-07-17 17:08:37 +00:00
Enhance option in command
This commit is contained in:
parent
3fad6c74fe
commit
235026e2c7
3 changed files with 6 additions and 8 deletions
|
@ -18,7 +18,7 @@ class ImportCommand extends ContainerAwareCommand
|
|||
->addArgument('userId', InputArgument::REQUIRED, 'User ID to populate')
|
||||
->addArgument('filepath', InputArgument::REQUIRED, 'Path to the JSON file')
|
||||
->addOption('importer', null, InputArgument::OPTIONAL, 'The importer to use: v1 or v2', 'v1')
|
||||
->addOption('markAsRead', null, InputArgument::OPTIONAL, 'Mark all entries as read: true/false', false)
|
||||
->addOption('markAsRead', null, InputArgument::OPTIONAL, 'Mark all entries as read', false)
|
||||
;
|
||||
}
|
||||
|
||||
|
@ -42,9 +42,7 @@ class ImportCommand extends ContainerAwareCommand
|
|||
$wallabag = $this->getContainer()->get('wallabag_import.wallabag_v2.import');
|
||||
}
|
||||
|
||||
if ('yes' === $input->getOption('markAsRead')) {
|
||||
$wallabag->setMarkAsRead(true);
|
||||
}
|
||||
$wallabag->setMarkAsRead($input->getOption('markAsRead'));
|
||||
|
||||
$res = $wallabag
|
||||
->setUser($user)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue