Merge pull request #18713 from nextcloud/fix/noid/do-remove-shares-generated-from-circles

remove non-circles-generated federated shares only
This commit is contained in:
Roeland Jago Douma 2020-01-08 09:11:27 +01:00 committed by GitHub
commit 69ae7abe72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -599,7 +599,8 @@ class FederatedShareProvider implements IShareProvider {
private function removeShareFromTableById($shareId) { private function removeShareFromTableById($shareId) {
$qb = $this->dbConnection->getQueryBuilder(); $qb = $this->dbConnection->getQueryBuilder();
$qb->delete('share') $qb->delete('share')
->where($qb->expr()->eq('id', $qb->createNamedParameter($shareId))); ->where($qb->expr()->eq('id', $qb->createNamedParameter($shareId)))
->where($qb->expr()->neq('share_type', $qb->createNamedParameter(IShare::TYPE_CIRCLE)));
$qb->execute(); $qb->execute();
$qb->delete('federated_reshares') $qb->delete('federated_reshares')