aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/js
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2016-02-24 19:49:03 +0100
committerLukas Reschke <lukas@owncloud.com>2016-02-24 19:58:41 +0100
commitdb2ddb54413831adef41fe5e233481a2d546731d (patch)
treece82ede1b4d80999acc57b23976005f6c4869991 /apps/files_external/js
parentbf4a0385351f4eb8757a31b4253803211d6cdec7 (diff)
downloadnextcloud-server-db2ddb54413831adef41fe5e233481a2d546731d.tar.gz
nextcloud-server-db2ddb54413831adef41fe5e233481a2d546731d.zip
Properly cast type
The current logic is checking whether: 1. The returned value is a boolen 2. The returned value is a string and then matches for "true" Since the config is now written to the database the data is now a string with the value "1" if HTTPS is set to true. Effectively this option was thus always disabled at the moment, falling back to plain HTTP. This change casts the data to a boolean if it is defined as boolean. Fixes https://github.com/owncloud/core/issues/22605 Fixes https://github.com/owncloud/core/issues/22016
Diffstat (limited to 'apps/files_external/js')
-rw-r--r--apps/files_external/js/settings.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js
index 26df203091e..cf4b27a7eab 100644
--- a/apps/files_external/js/settings.js
+++ b/apps/files_external/js/settings.js
@@ -859,6 +859,9 @@ MountConfigListView.prototype = _.extend({
var input = $(this);
var val = storageConfig.backendOptions[input.data('parameter')];
if (val !== undefined) {
+ if(input.is('input:checkbox')) {
+ input.prop('checked', val);
+ }
input.val(storageConfig.backendOptions[input.data('parameter')]);
highlightInput(input);
}