diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2015-03-13 12:29:13 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2015-03-30 14:00:50 +0200 |
commit | b0aa17b13fe504445a3108e46a56031ca4b73bc6 (patch) | |
tree | f1f9f08495bda85bcb713416fc08679aedf4f05a /lib/public/share.php | |
parent | 00b2be11dda5934998636ae774d29a16bd6d1f10 (diff) | |
download | nextcloud-server-b0aa17b13fe504445a3108e46a56031ca4b73bc6.tar.gz nextcloud-server-b0aa17b13fe504445a3108e46a56031ca4b73bc6.zip |
OCS Fixes to allow setting of password without removing additional settings
- Added setPassword to share.php
- Fixed OCS API call
- Added unit tests
Diffstat (limited to 'lib/public/share.php')
-rw-r--r-- | lib/public/share.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/public/share.php b/lib/public/share.php index d27c1825d62..fcdcc6a6d2c 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -318,6 +318,20 @@ class Share extends \OC\Share\Constants { } /** + * Set expiration date for a share + * @param int $shareId + * @param string $password + * @return boolean + */ + public static function setPassword($shareId, $password) { + $userSession = \OC::$server->getUserSession(); + $connection = \OC::$server->getDatabaseConnection(); + $config = \OC::$server->getConfig(); + return \OC\Share\Share::setPassword($userSession, $connection, $config, $shareId, $password); + } + + + /** * Get the backend class for the specified item type * @param string $itemType * @return Share_Backend |