diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-10-12 20:15:40 +0200 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-11-02 01:57:48 +0100 |
commit | fe8a67f5175b687ec6cc8230c7759ddddbe25b0a (patch) | |
tree | a696489d59ef601eb74bf43b751627dd4aab0e79 /lib/private/Share20/DefaultShareProvider.php | |
parent | 52cada951ba2f1849c0034e06520719c21fed9b2 (diff) | |
download | nextcloud-server-fe8a67f5175b687ec6cc8230c7759ddddbe25b0a.tar.gz nextcloud-server-fe8a67f5175b687ec6cc8230c7759ddddbe25b0a.zip |
Store "sendPasswordByTalk" property of link shares in the database
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'lib/private/Share20/DefaultShareProvider.php')
-rw-r--r-- | lib/private/Share20/DefaultShareProvider.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php index 50111054546..589b64fc58a 100644 --- a/lib/private/Share20/DefaultShareProvider.php +++ b/lib/private/Share20/DefaultShareProvider.php @@ -156,6 +156,8 @@ class DefaultShareProvider implements IShareProvider { $qb->setValue('password', $qb->createNamedParameter($share->getPassword())); } + $qb->setValue('password_by_talk', $qb->createNamedParameter($share->getSendPasswordByTalk(), IQueryBuilder::PARAM_BOOL)); + //If an expiration date is set store it if ($share->getExpirationDate() !== null) { $qb->setValue('expiration', $qb->createNamedParameter($share->getExpirationDate(), 'datetime')); @@ -293,6 +295,7 @@ class DefaultShareProvider implements IShareProvider { $qb->update('share') ->where($qb->expr()->eq('id', $qb->createNamedParameter($share->getId()))) ->set('password', $qb->createNamedParameter($share->getPassword())) + ->set('password_by_talk', $qb->createNamedParameter($share->getSendPasswordByTalk(), IQueryBuilder::PARAM_BOOL)) ->set('uid_owner', $qb->createNamedParameter($share->getShareOwner())) ->set('uid_initiator', $qb->createNamedParameter($share->getSharedBy())) ->set('permissions', $qb->createNamedParameter($share->getPermissions())) @@ -938,6 +941,7 @@ class DefaultShareProvider implements IShareProvider { $share->setSharedWith($data['share_with']); } else if ($share->getShareType() === \OCP\Share::SHARE_TYPE_LINK) { $share->setPassword($data['password']); + $share->setSendPasswordByTalk((bool)$data['password_by_talk']); $share->setToken($data['token']); } |