diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2017-03-28 15:11:07 +0200 |
---|---|---|
committer | Bjoern Schiessle <bjoern@schiessle.org> | 2017-04-03 10:20:49 +0200 |
commit | 0d5147bd492e11dcb1ed264bcc27d21dc026c6f1 (patch) | |
tree | 987445dafba0171b933727e6b4060ba7ad4845e6 /lib/private/Share20 | |
parent | d0eefd17d3c47de8d13d41e57a2a6966af94428f (diff) | |
download | nextcloud-server-0d5147bd492e11dcb1ed264bcc27d21dc026c6f1.tar.gz nextcloud-server-0d5147bd492e11dcb1ed264bcc27d21dc026c6f1.zip |
add new password column to the share table in order to set passwords for share by mails
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'lib/private/Share20')
-rw-r--r-- | lib/private/Share20/DefaultShareProvider.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Share20/DefaultShareProvider.php b/lib/private/Share20/DefaultShareProvider.php index e4ae26be13d..cf7666f99e7 100644 --- a/lib/private/Share20/DefaultShareProvider.php +++ b/lib/private/Share20/DefaultShareProvider.php @@ -240,7 +240,7 @@ class DefaultShareProvider implements IShareProvider { $qb = $this->dbConn->getQueryBuilder(); $qb->update('share') ->where($qb->expr()->eq('id', $qb->createNamedParameter($share->getId()))) - ->set('share_with', $qb->createNamedParameter($share->getPassword())) + ->set('password', $qb->createNamedParameter($share->getPassword())) ->set('uid_owner', $qb->createNamedParameter($share->getShareOwner())) ->set('uid_initiator', $qb->createNamedParameter($share->getSharedBy())) ->set('permissions', $qb->createNamedParameter($share->getPermissions())) @@ -646,7 +646,7 @@ class DefaultShareProvider implements IShareProvider { // exclude shares leading to trashbin on home storages $pathSections = explode('/', $data['path'], 2); // FIXME: would not detect rare md5'd home storage case properly - if ($pathSections[0] !== 'files' + if ($pathSections[0] !== 'files' && in_array(explode(':', $data['storage_string_id'], 2)[0], array('home', 'object'))) { return false; } @@ -838,7 +838,7 @@ class DefaultShareProvider implements IShareProvider { } else if ($share->getShareType() === \OCP\Share::SHARE_TYPE_GROUP) { $share->setSharedWith($data['share_with']); } else if ($share->getShareType() === \OCP\Share::SHARE_TYPE_LINK) { - $share->setPassword($data['share_with']); + $share->setPassword($data['password']); $share->setToken($data['token']); } |