From: Roeland Jago Douma Date: Fri, 6 Feb 2015 09:53:58 +0000 (+0100) Subject: Bit better formatting when using json output X-Git-Tag: v8.0.0~2^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3be3e20c0f3f1f11fe08a3ce97aef0e7164908b9;p=nextcloud-server.git Bit better formatting when using json output --- 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'; }