diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-01-27 10:52:00 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2016-01-27 11:09:43 +0100 |
commit | cfba90a78dbb011ff268ec3053f15ca764939c78 (patch) | |
tree | 2c647086202268d4e62ca5e2f11ccc85151753c6 /core/js/oc-backbone-webdav.js | |
parent | 1594371c8c0124af2469bd70b9b917bfd845ae19 (diff) | |
download | nextcloud-server-cfba90a78dbb011ff268ec3053f15ca764939c78.tar.gz nextcloud-server-cfba90a78dbb011ff268ec3053f15ca764939c78.zip |
Fix system tags proppatch with booleans
Backbone webdav adapter now converts booleans and ints to strings.
Fixed system tags to use "true" / "false" strings for booleans instead
of 1 / 0.
Diffstat (limited to 'core/js/oc-backbone-webdav.js')
-rw-r--r-- | core/js/oc-backbone-webdav.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/core/js/oc-backbone-webdav.js b/core/js/oc-backbone-webdav.js index 24a2bb50193..7c32116f011 100644 --- a/core/js/oc-backbone-webdav.js +++ b/core/js/oc-backbone-webdav.js @@ -127,11 +127,16 @@ var key; for (key in attrs) { var changedProp = davProperties[key]; + var value = attrs[key]; if (!changedProp) { console.warn('No matching DAV property for property "' + key); - continue; + changedProp = key; } - props[changedProp] = attrs[key]; + if (_.isBoolean(value) || _.isNumber(value)) { + // convert to string + value = '' + value; + } + props[changedProp] = value; } return props; } |