Merge pull request #31834 from nextcloud/backport/31816/stable22

[stable22] Deduplicate storage ids in list before reusing
This commit is contained in:
blizzz 2022-04-14 12:57:51 +02:00 committed by GitHub
commit 84cf872bb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -237,6 +237,7 @@ class Storage {
->from('mounts')
->where($query->expr()->eq('mount_id', $query->createNamedParameter($mountId, IQueryBuilder::PARAM_INT)));
$storageIds = $query->executeQuery()->fetchAll(\PDO::FETCH_COLUMN);
$storageIds = array_unique($storageIds);
$query = $db->getQueryBuilder();
$query->delete('filecache')