From 54a4aa9315aaeba5f202b87cf552919085193c9f Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sat, 22 Jul 2017 12:48:10 +0200 Subject: [PATCH] Use selectAlias() Signed-off-by: Joas Schilling --- lib/private/Repair/NC13/RepairInvalidPaths.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/private/Repair/NC13/RepairInvalidPaths.php b/lib/private/Repair/NC13/RepairInvalidPaths.php index 9d1463a5e1f..69ef3123d31 100644 --- a/lib/private/Repair/NC13/RepairInvalidPaths.php +++ b/lib/private/Repair/NC13/RepairInvalidPaths.php @@ -60,7 +60,9 @@ class RepairInvalidPaths implements IRepairStep { ); //select f.path, f.parent,p.path from oc_filecache f inner join oc_filecache p on f.parent=p.fileid and p.path!='' where f.path != p.path || '/' || f.name; - $query = $builder->select('f.fileid', 'f.path', 'p.path AS parent_path', 'f.name', 'f.parent', 'f.storage', 'p.storage as parent_storage') + $builder->select('f.fileid', 'f.path', 'f.name', 'f.parent', 'f.storage') + ->selectAlias('p.path', 'parent_path') + ->selectAlias('p.storage', 'parent_storage') ->from('filecache', 'f') ->innerJoin('f', 'filecache', 'p', $builder->expr()->andX( $builder->expr()->eq('f.parent', 'p.fileid'), @@ -70,7 +72,7 @@ class RepairInvalidPaths implements IRepairStep { ->setMaxResults(self::MAX_ROWS); do { - $result = $query->execute(); + $result = $builder->execute(); $rows = $result->fetchAll(); foreach ($rows as $row) { yield $row; -- 2.39.5