From bc3704b8c042791db25d58da8696bde432273bca Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Thu, 29 Jan 2026 11:10:32 +0100 Subject: [PATCH] feat: Allow filtering content by mimetype Signed-off-by: Carl Schwan --- lib/ACL/ACLCacheWrapper.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ACL/ACLCacheWrapper.php b/lib/ACL/ACLCacheWrapper.php index 4fc35c31e..ce341078f 100644 --- a/lib/ACL/ACLCacheWrapper.php +++ b/lib/ACL/ACLCacheWrapper.php @@ -57,8 +57,9 @@ protected function formatCacheEntry($entry, array $rules = []): ICacheEntry|fals } #[\Override] - public function getFolderContentsById($fileId): array { - $results = $this->getCache()->getFolderContentsById($fileId); + public function getFolderContentsById($fileId, ?string $mimeTypeFilter = null): array { + /** @psalm-suppress TooManyArguments Remove this in a few days */ + $results = $this->getCache()->getFolderContentsById($fileId, $mimeTypeFilter); $rules = $this->preloadEntries($results); return array_filter(array_map(fn (ICacheEntry $entry): ICacheEntry|false => $this->formatCacheEntry($entry, $rules), $results));