From ecc1f92bb6c7ac3121c35affad607a344a79ef52 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Wed, 23 Jul 2014 16:42:33 +0200 Subject: add OCS api call to set expire date for link shares --- lib/private/util.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'lib/private/util.php') diff --git a/lib/private/util.php b/lib/private/util.php index eea194288f9..47958ba7a0c 100755 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -22,7 +22,7 @@ class OC_Util { self::$rootMounted = true; } } - + /** * mounting an object storage as the root fs will in essence remove the * necessity of a data folder being present. @@ -50,7 +50,7 @@ class OC_Util { self::$rootMounted = true; } } - + /** * Can be set up * @param string $user @@ -170,6 +170,21 @@ class OC_Util { return false; } + /** + * check if share API enforces a default expire date + * @return boolean + */ + public static function isDefaultExpireDateEnforced() { + $isDefaultExpireDateEnabled = \OCP\Config::getAppValue('core', 'shareapi_default_expire_date', 'no'); + $enforceDefaultExpireDate = false; + if ($isDefaultExpireDateEnabled === 'yes') { + $value = \OCP\Config::getAppValue('core', 'shareapi_enforce_expire_date', 'no'); + $enforceDefaultExpireDate = ($value === 'yes') ? true : false; + } + + return $enforceDefaultExpireDate; + } + /** * Get the quota of a user * @param string $user -- cgit v1.2.3