summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-07-07 11:30:21 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2015-07-07 11:30:21 +0200
commit85f012512e040c8c666d4de60f73ca6330507090 (patch)
treeaa1a6c4af1b188cabf37f8ef5ede60dc5f82fa05
parente5bc9d06195f95940fda5b600560c11dcd720636 (diff)
downloadnextcloud-server-85f012512e040c8c666d4de60f73ca6330507090.tar.gz
nextcloud-server-85f012512e040c8c666d4de60f73ca6330507090.zip
Invert the "public" to a "private" method
-rw-r--r--core/command/config/listconfigs.php6
-rw-r--r--tests/core/command/config/listconfigstest.php18
2 files changed, 12 insertions, 12 deletions
diff --git a/core/command/config/listconfigs.php b/core/command/config/listconfigs.php
index c93d26cbda4..be3073e54d9 100644
--- a/core/command/config/listconfigs.php
+++ b/core/command/config/listconfigs.php
@@ -69,17 +69,17 @@ class ListConfigs extends Base {
'all'
)
->addOption(
- 'public',
+ 'private',
null,
InputOption::VALUE_NONE,
- 'Use this option when you want to exclude sensitive configs like passwords, salts, ...'
+ 'Use this option when you want to include sensitive configs like passwords, salts, ...'
)
;
}
protected function execute(InputInterface $input, OutputInterface $output) {
$app = $input->getArgument('app');
- $noSensitiveValues = $input->getOption('public');
+ $noSensitiveValues = !$input->getOption('private');
if ($noSensitiveValues && !$input->hasParameterOption('--output')) {
// If you post this publicly we prefer the json format
diff --git a/tests/core/command/config/listconfigstest.php b/tests/core/command/config/listconfigstest.php
index 06c0f08873f..c9913d83f7f 100644
--- a/tests/core/command/config/listconfigstest.php
+++ b/tests/core/command/config/listconfigstest.php
@@ -78,7 +78,7 @@ class ListConfigsTest extends TestCase {
'global_cache_gc_lastrun' => '1430388388',
]],
],
- true,
+ false,
json_encode([
'system' => [
'overwrite.cli.url' => 'http://localhost',
@@ -113,7 +113,7 @@ class ListConfigsTest extends TestCase {
'global_cache_gc_lastrun' => '1430388388',
]],
],
- false,
+ true,
json_encode([
'system' => [
'secret' => 'my secret',
@@ -149,7 +149,7 @@ class ListConfigsTest extends TestCase {
'global_cache_gc_lastrun' => '1430388388',
]],
],
- true,
+ false,
json_encode([
'system' => [
'overwrite.cli.url' => 'http://localhost',
@@ -176,7 +176,7 @@ class ListConfigsTest extends TestCase {
'global_cache_gc_lastrun' => '1430388388',
]],
],
- false,
+ true,
json_encode([
'system' => [
'secret' => 'my secret',
@@ -204,7 +204,7 @@ class ListConfigsTest extends TestCase {
'global_cache_gc_lastrun' => '1430388388',
]],
],
- true,
+ false,
json_encode([
'apps' => [
'files' => [
@@ -233,7 +233,7 @@ class ListConfigsTest extends TestCase {
'global_cache_gc_lastrun' => '1430388388',
]],
],
- false,
+ true,
json_encode([
'apps' => [
'files' => [
@@ -252,10 +252,10 @@ class ListConfigsTest extends TestCase {
* @param array $systemConfigs
* @param array $systemConfigMap
* @param array $appConfig
- * @param bool $public
+ * @param bool $private
* @param string $expected
*/
- public function testList($app, $systemConfigs, $systemConfigMap, $appConfig, $public, $expected) {
+ public function testList($app, $systemConfigs, $systemConfigMap, $appConfig, $private, $expected) {
$this->systemConfig->expects($this->any())
->method('getKeys')
->willReturn($systemConfigs);
@@ -279,7 +279,7 @@ class ListConfigsTest extends TestCase {
->method('getOption')
->willReturnMap([
['output', 'json'],
- ['public', $public],
+ ['private', $private],
]);
global $output;