mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
chore: cleanup unused code
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
36a0d1486e
commit
f87286754e
1 changed files with 0 additions and 43 deletions
|
|
@ -341,49 +341,6 @@ class FilesReportPlugin extends ServerPlugin {
|
|||
return $nodes;
|
||||
}
|
||||
|
||||
private function getSystemTagFileIds($systemTagIds) {
|
||||
$resultFileIds = null;
|
||||
|
||||
// check user permissions, if applicable
|
||||
if (!$this->isAdmin()) {
|
||||
// check visibility/permission
|
||||
$tags = $this->tagManager->getTagsByIds($systemTagIds);
|
||||
$unknownTagIds = [];
|
||||
foreach ($tags as $tag) {
|
||||
if (!$tag->isUserVisible()) {
|
||||
$unknownTagIds[] = $tag->getId();
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($unknownTagIds)) {
|
||||
throw new TagNotFoundException('Tag with ids ' . implode(', ', $unknownTagIds) . ' not found');
|
||||
}
|
||||
}
|
||||
|
||||
// fetch all file ids and intersect them
|
||||
foreach ($systemTagIds as $systemTagId) {
|
||||
$fileIds = $this->tagMapper->getObjectIdsForTags($systemTagId, 'files');
|
||||
|
||||
if (empty($fileIds)) {
|
||||
// This tag has no files, nothing can ever show up
|
||||
return [];
|
||||
}
|
||||
|
||||
// first run ?
|
||||
if ($resultFileIds === null) {
|
||||
$resultFileIds = $fileIds;
|
||||
} else {
|
||||
$resultFileIds = array_intersect($resultFileIds, $fileIds);
|
||||
}
|
||||
|
||||
if (empty($resultFileIds)) {
|
||||
// Empty intersection, nothing can show up anymore
|
||||
return [];
|
||||
}
|
||||
}
|
||||
return $resultFileIds;
|
||||
}
|
||||
|
||||
/**
|
||||
* @suppress PhanUndeclaredClassMethod
|
||||
* @param array $circlesIds
|
||||
|
|
|
|||
Loading…
Reference in a new issue