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/public | |
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/public')
-rw-r--r-- | lib/public/share.php | 5 | ||||
-rw-r--r-- | lib/public/util.php | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/lib/public/share.php b/lib/public/share.php index 8566a38c61e..c0939dce53f 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -298,10 +298,11 @@ class Share extends \OC\Share\Constants { * @param string $itemType * @param string $itemSource * @param string $date expiration date + * @param int $shareTime timestamp from when the file was shared * @return boolean */ - public static function setExpirationDate($itemType, $itemSource, $date) { - return \OC\Share\Share::setExpirationDate($itemType, $itemSource, $date); + public static function setExpirationDate($itemType, $itemSource, $date, $shareTime = null) { + return \OC\Share\Share::setExpirationDate($itemType, $itemSource, $date, $shareTime); } /** diff --git a/lib/public/util.php b/lib/public/util.php index ff8c743c0df..87b7a4f19db 100644 --- a/lib/public/util.php +++ b/lib/public/util.php @@ -519,6 +519,15 @@ class Util { } /** + * check if share API enforces a default expire date + * @return boolean + */ + public static function isDefaultExpireDateEnforced() { + return \OC_Util::isDefaultExpireDateEnforced(); + } + + + /** * Checks whether the current version needs upgrade. * * @return bool true if upgrade is needed, false otherwise |