fix concat usage

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2022-11-10 16:05:42 +01:00
parent 060c607716
commit 8c097afbdc
No known key found for this signature in database
GPG key ID: 42B69D8A64526EFB

View file

@ -110,7 +110,7 @@ class RepairShareOwnership extends Command {
->join('s', 'filecache', 'f', $qb->expr()->eq('s.item_source', $qb->expr()->castColumn('f.fileid', IQueryBuilder::PARAM_STR)))
->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'))
->andWhere($qb->expr()->eq($qb->func()->concat($qb->expr()->literal('/'), $qb->func()->concat('m.user_id', $qb->expr()->literal('/'))), 'm.mount_point'))
->executeQuery()
->fetchAll();
@ -143,7 +143,7 @@ class RepairShareOwnership extends Command {
->join('s', 'filecache', 'f', $qb->expr()->eq('s.item_source', $qb->expr()->castColumn('f.fileid', IQueryBuilder::PARAM_STR)))
->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'))
->andWhere($qb->expr()->eq($qb->func()->concat($qb->expr()->literal('/'), $qb->func()->concat('m.user_id', $qb->expr()->literal('/'))), 'm.mount_point'))
->andWhere($qb->expr()->eq('s.share_with', $qb->createNamedParameter($user->getUID())))
->executeQuery()
->fetchAll();