diff options
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareAPIController.php | 9 | ||||
-rw-r--r-- | apps/files_sharing/lib/MountProvider.php | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index 72ebd39ea07..e2ea4012208 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -1986,10 +1986,17 @@ class ShareAPIController extends OCSController { $formattedShareAttributes = \json_decode($attributesString, true); if (is_array($formattedShareAttributes)) { foreach ($formattedShareAttributes as $formattedAttr) { + // Legacy handling of the 'enabled' attribute + if ($formattedAttr['enabled']) { + $formattedAttr['value'] = is_string($formattedAttr['enabled']) + ? (bool) \json_decode($formattedAttr['enabled']) + : $formattedAttr['enabled']; + } + $newShareAttributes->setAttribute( $formattedAttr['scope'], $formattedAttr['key'], - is_string($formattedAttr['enabled']) ? (bool) \json_decode($formattedAttr['enabled']) : $formattedAttr['enabled'] + $formattedAttr['value'], ); } } else { diff --git a/apps/files_sharing/lib/MountProvider.php b/apps/files_sharing/lib/MountProvider.php index b70c16872ee..8968f6fa4d1 100644 --- a/apps/files_sharing/lib/MountProvider.php +++ b/apps/files_sharing/lib/MountProvider.php @@ -215,7 +215,7 @@ class MountProvider implements IMountProvider { continue; } // update supershare attributes with subshare attribute - $superAttributes->setAttribute($attribute['scope'], $attribute['key'], $attribute['enabled']); + $superAttributes->setAttribute($attribute['scope'], $attribute['key'], $attribute['value']); } } |