aboutsummaryrefslogtreecommitdiffstats
path: root/core/Command/Config/ListConfigs.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/Command/Config/ListConfigs.php')
-rw-r--r--core/Command/Config/ListConfigs.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/Command/Config/ListConfigs.php b/core/Command/Config/ListConfigs.php
index 094348dd9ba..a7c195276eb 100644
--- a/core/Command/Config/ListConfigs.php
+++ b/core/Command/Config/ListConfigs.php
@@ -7,6 +7,7 @@
*/
namespace OC\Core\Command\Config;
+use OC\Config\ConfigManager;
use OC\Core\Command\Base;
use OC\SystemConfig;
use OCP\IAppConfig;
@@ -22,6 +23,7 @@ class ListConfigs extends Base {
public function __construct(
protected SystemConfig $systemConfig,
protected IAppConfig $appConfig,
+ protected ConfigManager $configManager,
) {
parent::__construct();
}
@@ -44,6 +46,7 @@ class ListConfigs extends Base {
InputOption::VALUE_NONE,
'Use this option when you want to include sensitive configs like passwords, salts, ...'
)
+ ->addOption('migrate', null, InputOption::VALUE_NONE, 'Rename config keys of all enabled apps, based on ConfigLexicon')
;
}
@@ -51,6 +54,10 @@ class ListConfigs extends Base {
$app = $input->getArgument('app');
$noSensitiveValues = !$input->getOption('private');
+ if ($input->getOption('migrate')) {
+ $this->configManager->migrateConfigLexiconKeys(($app === 'all') ? null : $app);
+ }
+
if (!is_string($app)) {
$output->writeln('<error>Invalid app value given</error>');
return 1;
@@ -118,7 +125,7 @@ class ListConfigs extends Base {
*/
protected function getAppConfigs(string $app, bool $noSensitiveValues) {
if ($noSensitiveValues) {
- return $this->appConfig->getFilteredValues($app, false);
+ return $this->appConfig->getFilteredValues($app);
} else {
return $this->appConfig->getValues($app, false);
}