From 0d5147bd492e11dcb1ed264bcc27d21dc026c6f1 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Tue, 28 Mar 2017 15:11:07 +0200 Subject: add new password column to the share table in order to set passwords for share by mails Signed-off-by: Bjoern Schiessle --- lib/private/Share20/DefaultShareProvider.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/private/Share20') 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']); } -- cgit v1.2.3