diff options
author | Björn Schießle <schiessle@owncloud.com> | 2014-07-28 17:28:32 +0200 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2014-07-28 17:28:32 +0200 |
commit | c53b56e3139e517af4bca2aca631f625f435f74e (patch) | |
tree | faea592fb96f60e69036bb43e7ccba2d35a808f8 /lib/private/util.php | |
parent | 1fbbaed26149cd2261637e5a737b22089340345b (diff) | |
parent | b7958f79c39b78304daa19ece96072acec50c2ba (diff) | |
download | nextcloud-server-c53b56e3139e517af4bca2aca631f625f435f74e.tar.gz nextcloud-server-c53b56e3139e517af4bca2aca631f625f435f74e.zip |
Merge pull request #9798 from owncloud/ocs_share_api_add_expire_date
[share api] add OCS api call to set expire date for link shares
Diffstat (limited to 'lib/private/util.php')
-rwxr-xr-x | lib/private/util.php | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/private/util.php b/lib/private/util.php index 67da7a2f63f..896b076afa6 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 @@ -171,6 +171,21 @@ class OC_Util { } /** + * 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 * @return int Quota bytes |