diff options
author | Joas Schilling <coding@schilljs.com> | 2017-07-22 12:48:10 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-08-02 09:48:16 +0200 |
commit | a5b0308713977ee3c970cda685bcc96ef5f9b125 (patch) | |
tree | a28202ba4a5451fecfb4466ade6da0dc639f1625 /lib | |
parent | 20f8d1094ab9958dc50104a79a2ad0f0a9e0ce1a (diff) | |
download | nextcloud-server-a5b0308713977ee3c970cda685bcc96ef5f9b125.tar.gz nextcloud-server-a5b0308713977ee3c970cda685bcc96ef5f9b125.zip |
Use selectAlias()
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Repair/NC13/RepairInvalidPaths.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/Repair/NC13/RepairInvalidPaths.php b/lib/private/Repair/NC13/RepairInvalidPaths.php index 5a4187949a7..734ee8a4ca6 100644 --- a/lib/private/Repair/NC13/RepairInvalidPaths.php +++ b/lib/private/Repair/NC13/RepairInvalidPaths.php @@ -64,7 +64,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'), @@ -74,7 +76,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; |