aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2017-01-22 13:19:46 +0100
committerThomas Citharel <tcit@tcit.fr>2017-01-22 13:19:46 +0100
commita607b7a9c0870bcdfb4b4e7920d20b5ed39f14fe (patch)
tree58a3b5a58fa6cf1da789862f996aa4151ad10245 /src
parent8303b037fb4e64b542f6f755828b999fdf6eebb0 (diff)
downloadwallabag-a607b7a9c0870bcdfb4b4e7920d20b5ed39f14fe.tar.gz
wallabag-a607b7a9c0870bcdfb4b4e7920d20b5ed39f14fe.tar.zst
wallabag-a607b7a9c0870bcdfb4b4e7920d20b5ed39f14fe.zip
add filepath test
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'src')
-rw-r--r--src/Wallabag/CoreBundle/Command/ExportCommand.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Command/ExportCommand.php b/src/Wallabag/CoreBundle/Command/ExportCommand.php
index 9c3c3fef..0cf5de48 100644
--- a/src/Wallabag/CoreBundle/Command/ExportCommand.php
+++ b/src/Wallabag/CoreBundle/Command/ExportCommand.php
@@ -23,7 +23,7 @@ class ExportCommand extends ContainerAwareCommand
23 'User from which to export entries' 23 'User from which to export entries'
24 ) 24 )
25 ->addArgument( 25 ->addArgument(
26 'filename', 26 'filepath',
27 InputArgument::OPTIONAL, 27 InputArgument::OPTIONAL,
28 'Path of the exported file' 28 'Path of the exported file'
29 ) 29 )
@@ -46,7 +46,7 @@ class ExportCommand extends ContainerAwareCommand
46 46
47 $output->write(sprintf('Exporting %d entrie(s) for user « <comment>%s</comment> »... ', count($entries), $user->getUserName())); 47 $output->write(sprintf('Exporting %d entrie(s) for user « <comment>%s</comment> »... ', count($entries), $user->getUserName()));
48 48
49 $filePath = $input->getArgument('filename'); 49 $filePath = $input->getArgument('filepath');
50 if (!$filePath) { 50 if (!$filePath) {
51 $filePath = $this->getContainer()->getParameter('kernel.root_dir') . '/../' . sprintf('%s-export', $user->getUsername()); 51 $filePath = $this->getContainer()->getParameter('kernel.root_dir') . '/../' . sprintf('%s-export', $user->getUsername());
52 } 52 }