diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-05-07 11:23:50 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2014-05-19 01:38:47 +0200 |
commit | ab7ae004f7f5620b474ad506990cba56823c42b2 (patch) | |
tree | bea6fda77acf7cd6605d2552cddecaf61f6a2c3f /lib/public | |
parent | a7509e5fd98c05ea98d8b2e9f6b462ba1af51ca2 (diff) | |
download | nextcloud-server-ab7ae004f7f5620b474ad506990cba56823c42b2.tar.gz nextcloud-server-ab7ae004f7f5620b474ad506990cba56823c42b2.zip |
Automatically copy the share expiration date when new shares are created
Fix #4823
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/share.php | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/public/share.php b/lib/public/share.php index 33c5069ac57..8566a38c61e 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -226,17 +226,13 @@ class Share extends \OC\Share\Constants { * @param int $shareType SHARE_TYPE_USER, SHARE_TYPE_GROUP, or SHARE_TYPE_LINK * @param string $shareWith User or group the item is being shared with * @param int $permissions CRUDS - * @param null $itemSourceName - * @throws \Exception - * @internal param \OCP\Item $string type - * @internal param \OCP\Item $string source - * @internal param \OCP\SHARE_TYPE_USER $int , SHARE_TYPE_GROUP, or SHARE_TYPE_LINK - * @internal param \OCP\User $string or group the item is being shared with - * @internal param \OCP\CRUDS $int permissions + * @param string $itemSourceName + * @param \DateTime $expirationDate * @return bool|string Returns true on success or false on failure, Returns token on success for links + * @throws \Exception */ - public static function shareItem($itemType, $itemSource, $shareType, $shareWith, $permissions, $itemSourceName = null) { - return \OC\Share\Share::shareItem($itemType, $itemSource, $shareType, $shareWith, $permissions, $itemSourceName); + public static function shareItem($itemType, $itemSource, $shareType, $shareWith, $permissions, $itemSourceName = null, \DateTime $expirationDate = null) { + return \OC\Share\Share::shareItem($itemType, $itemSource, $shareType, $shareWith, $permissions, $itemSourceName, $expirationDate); } /** |