aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/share.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2015-03-13 12:29:13 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2015-03-30 14:00:50 +0200
commitb0aa17b13fe504445a3108e46a56031ca4b73bc6 (patch)
treef1f9f08495bda85bcb713416fc08679aedf4f05a /lib/public/share.php
parent00b2be11dda5934998636ae774d29a16bd6d1f10 (diff)
downloadnextcloud-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.php14
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