Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: optimise getWrongShareOwnership query
Signed-off-by: Hamza Mahjoubi <[email protected]>
  • Loading branch information
hamza221 authored and backportbot[bot] committed Aug 28, 2024
commit e2a7575abba881148478356a3a5fd0d9e51583fa
2 changes: 1 addition & 1 deletion core/Command/Maintenance/RepairShareOwnership.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ protected function getWrongShareOwnership(): array {
$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'))
Expand Down