summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArdinis <Ardinis@users.noreply.github.com>2017-04-20 11:31:04 +0200
committerGitHub <noreply@github.com>2017-04-20 11:31:04 +0200
commit71118214f94971af98579876401e1b8501fa7e1c (patch)
tree3a2db85429597e54665d827f7ca8ed6e086c6479
parent3db84ed90ad1f9f97b233f4bf36b3750a53376fd (diff)
downloadnextcloud-server-71118214f94971af98579876401e1b8501fa7e1c.tar.gz
nextcloud-server-71118214f94971af98579876401e1b8501fa7e1c.zip
reviewed
-rw-r--r--apps/files_external/lib/Command/Config.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/files_external/lib/Command/Config.php b/apps/files_external/lib/Command/Config.php
index b928f66d592..5df6f7ee650 100644
--- a/apps/files_external/lib/Command/Config.php
+++ b/apps/files_external/lib/Command/Config.php
@@ -91,6 +91,9 @@ class Config extends Base {
} else {
$value = $mount->getBackendOption($key);
}
+ if (!is_string($value) && json_decode(json_encode($value)) === $value) { // show bools and objects correctly
+ $value = json_encode($value);
+ }
$output->writeln($value);
}
@@ -101,6 +104,10 @@ class Config extends Base {
* @param OutputInterface $output
*/
protected function setOption(StorageConfig $mount, $key, $value, OutputInterface $output) {
+ $decoded = json_decode($value, true);
+ if (!is_null($decoded) && json_encode($decoded) === $value) {
+ $value = $decoded;
+ }
if ($key === 'mountpoint' || $key === 'mount_point') {
$mount->setMountPoint($value);
} else {