From 5f903bb6ec50c99187e721607041046f129f1c0f Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Mon, 7 Oct 2024 15:36:53 +0200 Subject: fix(sharebymail): Fix share update when node id changed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes transfering an email share from a user to another one when using objectstore as primary storage. Signed-off-by: Côme Chilliet --- apps/sharebymail/lib/ShareByMailProvider.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'apps/sharebymail/lib') diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php index 60b7f20b88d..1b16948ccc4 100644 --- a/apps/sharebymail/lib/ShareByMailProvider.php +++ b/apps/sharebymail/lib/ShareByMailProvider.php @@ -673,11 +673,14 @@ class ShareByMailProvider implements IShareProvider { } /* - * We allow updating the permissions and password of mail shares + * We allow updating mail shares */ $qb = $this->dbConnection->getQueryBuilder(); $qb->update('share') ->where($qb->expr()->eq('id', $qb->createNamedParameter($share->getId()))) + ->set('item_source', $qb->createNamedParameter($share->getNode()->getId())) + ->set('file_source', $qb->createNamedParameter($share->getNode()->getId())) + ->set('share_with', $qb->createNamedParameter($share->getSharedWith())) ->set('permissions', $qb->createNamedParameter($share->getPermissions())) ->set('uid_owner', $qb->createNamedParameter($share->getShareOwner())) ->set('uid_initiator', $qb->createNamedParameter($share->getSharedBy())) -- cgit v1.2.3