summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_sharing/lib/capabilities.php22
1 files changed, 8 insertions, 14 deletions
diff --git a/apps/files_sharing/lib/capabilities.php b/apps/files_sharing/lib/capabilities.php
index 712eb2317b4..25b0484b2ee 100644
--- a/apps/files_sharing/lib/capabilities.php
+++ b/apps/files_sharing/lib/capabilities.php
@@ -24,28 +24,22 @@ class Capabilities {
$res = array();
if ($config->getAppValue('core', 'shareapi_allow_links', 'yes') === "yes") {
- $res["allow_links"] = 1;
+ $res["allow_links"] = true;
if ($config->getAppValue('core', 'shareapi_enforce_links_password', 'yes') === "yes") {
- $res["enforce_links_password"] = 1;
- } else {
- $res["enforce_links_password"] = 0;
- }
+ $res["enforce_links_password"] = true;
+ }
if ($config->getAppValue('core', 'shareapi_allow_public_upload', 'yes') === "yes") {
- $res["allow_public_upload"] = 1;
- } else {
- $res["allow_public_upload"] = 0;
+ $res["allow_public_upload"] = true;
}
- } else {
- $res["allow_links"] = 0;
- }
+
+ $res = array("sharing" => $res);
+ }
return new \OC_OCS_Result(array(
'capabilities' => array(
- 'files' => array(
- 'sharing' => $res
- ),
+ 'files' => $res
),
));
}