diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2015-02-06 10:53:58 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2015-02-06 10:55:33 +0100 |
commit | 3be3e20c0f3f1f11fe08a3ce97aef0e7164908b9 (patch) | |
tree | 89404fb0a4b7b54a3fa3a616615441a85cd200dd | |
parent | d4e361db44e50787d5f660d5947aeeef82c38bf4 (diff) | |
download | nextcloud-server-3be3e20c0f3f1f11fe08a3ce97aef0e7164908b9.tar.gz nextcloud-server-3be3e20c0f3f1f11fe08a3ce97aef0e7164908b9.zip |
Bit better formatting when using json output
-rw-r--r-- | apps/files_sharing/lib/capabilities.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/capabilities.php b/apps/files_sharing/lib/capabilities.php index 50db775e3ed..ff017707193 100644 --- a/apps/files_sharing/lib/capabilities.php +++ b/apps/files_sharing/lib/capabilities.php @@ -41,12 +41,14 @@ class Capabilities { public function getCaps() { $res = array(); - $public = array(); + $public = false;; if ($this->config->getAppValue('core', 'shareapi_allow_links', 'yes') === 'yes') { + $public = array(); $public['password_enforced'] = ($this->config->getAppValue('core', 'shareapi_enforce_links_password', 'yes') === 'yes'); - $public['expire_date'] = array(); + $public['expire_date'] = false; if ($this->config->getAppValue('core', 'shareapi_default_expire_date', 'yes') === 'yes') { + $public['expire_date'] = array(); $public['expire_date']['days'] = $this->config->getAppValue('core', 'shareapi_expire_after_n_days', false); $public['expire_date']['enforce'] = $this->config->getAppValue('core', 'shareapi_enforce_expire_date', 'yes') === 'yes'; } |