mirror of
https://github.com/nextcloud/server.git
synced 2026-03-29 22:03:27 -04:00
fix: ensure searchBySystemTag() is available
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
48c92ade85
commit
6d249b56bd
1 changed files with 3 additions and 1 deletions
|
|
@ -330,7 +330,9 @@ class FilesReportPlugin extends ServerPlugin {
|
|||
|
||||
$nodes = [];
|
||||
|
||||
if (!empty($systemTagIds)) {
|
||||
// type check to ensure searchBySystemTag is available, it is not
|
||||
// exposed in API yet
|
||||
if (!empty($systemTagIds) && $this->userFolder instanceof \OC\Files\Node\Folder) {
|
||||
$tags = $this->tagManager->getTagsByIds($systemTagIds);
|
||||
$tagName = (current($tags))->getName();
|
||||
$nodes = $this->userFolder->searchBySystemTag($tagName, $this->userSession->getUser()->getUID(), $limit ?? 0, $offset ?? 0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue