From 6ed4c8a9463d725fafb94a84ca728d57de6e56d1 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Fri, 14 Aug 2020 08:06:53 +0200 Subject: Improve recent file fetching Fixes #16876 Before we'd just fetch everything from all storages we'd have access to. Then we'd sort. And filter in php. Now this of course is tricky if a user shared just a file with you and then has a ton of activity. Now we try to contruct the prefix path. So that the filtering can happen right away in the databae. Now this will make the DB more busy. But it should help overall as in most cases less queries are needed then etc. Signed-off-by: Roeland Jago Douma --- apps/files_sharing/lib/SharedStorage.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'apps/files_sharing/lib') diff --git a/apps/files_sharing/lib/SharedStorage.php b/apps/files_sharing/lib/SharedStorage.php index d40e94e36db..7477e5601ff 100644 --- a/apps/files_sharing/lib/SharedStorage.php +++ b/apps/files_sharing/lib/SharedStorage.php @@ -505,4 +505,9 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto public function setMountOptions(array $options) { $this->mountOptions = $options; } + + public function getUnjailedPath($path) { + $this->init(); + return parent::getUnjailedPath($path); + } } -- cgit v1.2.3