]> source.dussan.org Git - nextcloud-server.git/commitdiff
Prevent column name conflict between tables
authorLouis Chemineau <louis@chmn.me>
Thu, 31 Mar 2022 09:38:26 +0000 (11:38 +0200)
committerLouis (Rebase PR Action) <artonge@users.noreply.github.com>
Tue, 26 Jul 2022 12:17:46 +0000 (12:17 +0000)
Signed-off-by: Louis Chemineau <louis@chmn.me>
lib/private/Share20/DefaultShareProvider.php

index 520bd17d3cf08531daf94ab410d48215131f40f8..74f3e953a720336c52acf446e444a813ae1be513 100644 (file)
@@ -643,7 +643,10 @@ class DefaultShareProvider implements IShareProvider {
 
        public function getSharesInFolder($userId, Folder $node, $reshares) {
                $qb = $this->dbConn->getQueryBuilder();
-               $qb->select('*')
+               $qb->select('s.*',
+                               'f.fileid', 'f.path', 'f.permissions AS f_permissions', 'f.storage', 'f.path_hash',
+                               'f.parent AS f_parent', 'f.name', 'f.mimetype', 'f.mimepart', 'f.size', 'f.mtime', 'f.storage_mtime',
+                               'f.encrypted', 'f.unencrypted_size', 'f.etag', 'f.checksum')
                        ->from('share', 's')
                        ->andWhere($qb->expr()->orX(
                                $qb->expr()->eq('item_type', $qb->createNamedParameter('file')),