aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/MountProvider.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/MountProvider.php b/apps/files_sharing/lib/MountProvider.php
index 954c9cf70e6..a9705e94906 100644
--- a/apps/files_sharing/lib/MountProvider.php
+++ b/apps/files_sharing/lib/MountProvider.php
@@ -229,6 +229,13 @@ class MountProvider implements IMountProvider {
->setShareType($shares[0]->getShareType())
->setTarget($shares[0]->getTarget());
+ // Gather notes from all the shares.
+ // Since these are readly available here, storing them
+ // enables the DAV FilesPlugin to avoid executing many
+ // DB queries to retrieve the same information.
+ $allNotes = implode("\n", array_map(function ($sh) { return $sh->getNote(); }, $shares));
+ $superShare->setNote($allNotes);
+
// use most permissive permissions
// this covers the case where there are multiple shares for the same
// file e.g. from different groups and different permissions