[Pkg-owncloud-commits] [owncloud] 18/34: Bit better formatting when using json output

David Prévot taffit at moszumanska.debian.org
Wed Mar 11 15:49:37 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to annotated tag v8.0.0
in repository owncloud.

commit 3be3e20c0f3f1f11fe08a3ce97aef0e7164908b9
Author: Roeland Jago Douma <roeland at famdouma.nl>
Date:   Fri Feb 6 10:53:58 2015 +0100

    Bit better formatting when using json output
---
 apps/files_sharing/lib/capabilities.php | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/apps/files_sharing/lib/capabilities.php b/apps/files_sharing/lib/capabilities.php
index 50db775..ff01770 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';
 			}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list