mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 09:42:09 -04:00
Merge pull request #4404 from Ardinis/master
Remove json handling for files_external:config
This commit is contained in:
commit
8a743e0359
1 changed files with 6 additions and 6 deletions
|
|
@ -91,9 +91,9 @@ class Config extends Base {
|
|||
} else {
|
||||
$value = $mount->getBackendOption($key);
|
||||
}
|
||||
if (!is_string($value)) { // show bools and objects correctly
|
||||
$value = json_encode($value);
|
||||
}
|
||||
if (!is_string($value) && json_decode(json_encode($value)) === $value) { // show bools and objects correctly
|
||||
$value = json_encode($value);
|
||||
}
|
||||
$output->writeln($value);
|
||||
}
|
||||
|
||||
|
|
@ -105,9 +105,9 @@ class Config extends Base {
|
|||
*/
|
||||
protected function setOption(StorageConfig $mount, $key, $value, OutputInterface $output) {
|
||||
$decoded = json_decode($value, true);
|
||||
if (!is_null($decoded)) {
|
||||
$value = $decoded;
|
||||
}
|
||||
if (!is_null($decoded) && json_encode($decoded) === $value) {
|
||||
$value = $decoded;
|
||||
}
|
||||
if ($key === 'mountpoint' || $key === 'mount_point') {
|
||||
$mount->setMountPoint($value);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue