]> source.dussan.org Git - nextcloud-server.git/commitdiff
Bit better formatting when using json output
authorRoeland Jago Douma <roeland@famdouma.nl>
Fri, 6 Feb 2015 09:53:58 +0000 (10:53 +0100)
committerRoeland Jago Douma <roeland@famdouma.nl>
Fri, 6 Feb 2015 09:55:33 +0000 (10:55 +0100)
apps/files_sharing/lib/capabilities.php

index 50db775e3ed7e8d9f27638b921bb588efcefeb27..ff017707193ff9397dccadbb76ffbb96aadbf338 100644 (file)
@@ -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';
                        }