aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/console
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-01-09 00:05:32 +0100
committerJoas Schilling <nickvergessen@gmx.de>2014-01-10 11:36:11 +0100
commita70973ea423fda2a26fc8ff17e6e9c33bee11547 (patch)
tree608f0a685fd28a1ae45754021136cfbf20f71424 /phpBB/phpbb/console
parent5d89c283f0dfbce0f615432671628d9d10736334 (diff)
downloadforums-a70973ea423fda2a26fc8ff17e6e9c33bee11547.tar
forums-a70973ea423fda2a26fc8ff17e6e9c33bee11547.tar.gz
forums-a70973ea423fda2a26fc8ff17e6e9c33bee11547.tar.bz2
forums-a70973ea423fda2a26fc8ff17e6e9c33bee11547.tar.xz
forums-a70973ea423fda2a26fc8ff17e6e9c33bee11547.zip
[ticket/12039] Allow getting the value without a new line at the end
PHPBB3-12039
Diffstat (limited to 'phpBB/phpbb/console')
-rw-r--r--phpBB/phpbb/console/command/config/get.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/phpBB/phpbb/console/command/config/get.php b/phpBB/phpbb/console/command/config/get.php
index 1f9781ea9c..275c82b53f 100644
--- a/phpBB/phpbb/console/command/config/get.php
+++ b/phpBB/phpbb/console/command/config/get.php
@@ -25,6 +25,12 @@ class get extends command
InputArgument::REQUIRED,
"The configuration option's name"
)
+ ->addOption(
+ 'no-newline',
+ null,
+ InputOption::VALUE_NONE,
+ 'Set this option if the value should be printed without a new line at the end.'
+ )
;
}
@@ -32,7 +38,11 @@ class get extends command
{
$key = $input->getArgument('key');
- if (isset($this->config[$key]))
+ if (isset($this->config[$key]) && $input->getOption('no-newline'))
+ {
+ $output->write($this->config[$key]);
+ }
+ elseif (isset($this->config[$key]))
{
$output->writeln($this->config[$key]);
}