diff options
Diffstat (limited to 'lib/private/Repair/NC13/RepairInvalidPaths.php')
-rw-r--r-- | lib/private/Repair/NC13/RepairInvalidPaths.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/private/Repair/NC13/RepairInvalidPaths.php b/lib/private/Repair/NC13/RepairInvalidPaths.php index 5a4187949a7..29a0e1ed157 100644 --- a/lib/private/Repair/NC13/RepairInvalidPaths.php +++ b/lib/private/Repair/NC13/RepairInvalidPaths.php @@ -64,17 +64,19 @@ 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'), - $builder->expr()->neq('p.name', $builder->createNamedParameter('')) + $builder->expr()->nonEmptyString('p.name') )) ->where($builder->expr()->neq('f.path', $computedPath)) ->setMaxResults(self::MAX_ROWS); do { - $result = $query->execute(); + $result = $builder->execute(); $rows = $result->fetchAll(); foreach ($rows as $row) { yield $row; |