aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHamza Mahjoubi <hamzamahjoubi221@gmail.com>2024-08-27 14:07:28 +0200
committerAndy Scherzinger <info@andy-scherzinger.de>2024-08-29 11:16:22 +0200
commit6bc88231d6a6d1b0211435e7f73a533d020767c7 (patch)
tree72eeb2f170dc98551b1ea191a6b190c85aa8e51a
parentd02c778fa5f1059b2ba5c5f9b5b71f79cd3fea8d (diff)
downloadnextcloud-server-6bc88231d6a6d1b0211435e7f73a533d020767c7.tar.gz
nextcloud-server-6bc88231d6a6d1b0211435e7f73a533d020767c7.zip
fix: optimise getWrongShareOwnership query
Signed-off-by: Hamza Mahjoubi <hamzamahjoubi221@gmail.com>
-rw-r--r--core/Command/Maintenance/RepairShareOwnership.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/Command/Maintenance/RepairShareOwnership.php b/core/Command/Maintenance/RepairShareOwnership.php
index 56a95b68ed7..842ee769e8c 100644
--- a/core/Command/Maintenance/RepairShareOwnership.php
+++ b/core/Command/Maintenance/RepairShareOwnership.php
@@ -85,7 +85,7 @@ class RepairShareOwnership extends Command {
$brokenShares = $qb
->select('s.id', 'm.user_id', 's.uid_owner', 's.uid_initiator', 's.share_with', 's.file_target')
->from('share', 's')
- ->join('s', 'filecache', 'f', $qb->expr()->eq('s.item_source', $qb->expr()->castColumn('f.fileid', IQueryBuilder::PARAM_STR)))
+ ->join('s', 'filecache', 'f', $qb->expr()->eq($qb->expr()->castColumn('s.item_source', IQueryBuilder::PARAM_INT), 'f.fileid'))
->join('s', 'mounts', 'm', $qb->expr()->eq('f.storage', 'm.storage_id'))
->where($qb->expr()->neq('m.user_id', 's.uid_owner'))
->andWhere($qb->expr()->eq($qb->func()->concat($qb->expr()->literal('/'), 'm.user_id', $qb->expr()->literal('/')), 'm.mount_point'))