summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-04-08 14:44:17 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-04-08 14:44:17 +0200
commit103d451459efe539f13e0bebf968cf94c322ec0e (patch)
tree5ed22f078da852d709ed65c3bc3304ac8547ca5f /lib/public
parentd01a2acbcf2aa0dbea56bc1ad7cb855dfabdd746 (diff)
parent3b1f0e60194aea021433031bd62b3173b912d712 (diff)
downloadnextcloud-server-103d451459efe539f13e0bebf968cf94c322ec0e.tar.gz
nextcloud-server-103d451459efe539f13e0bebf968cf94c322ec0e.zip
Merge pull request #14987 from rullzer/ocs_password_fix2
OCS Fixes to allow setting of password without removing additional settings
Diffstat (limited to 'lib/public')
-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