mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
Fetch node and filename also if access cache was used
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
e5162fb9af
commit
f0e50bcb74
1 changed files with 9 additions and 0 deletions
|
|
@ -52,6 +52,11 @@ class ResourceProvider implements IProvider {
|
|||
if (isset($this->nodes[(int) $resource->getId()])) {
|
||||
return $this->nodes[(int) $resource->getId()];
|
||||
}
|
||||
$nodes = $this->rootFolder->getById((int) $resource->getId());
|
||||
if (!empty($nodes)) {
|
||||
$this->nodes[(int) $resource->getId()] = array_shift($nodes);
|
||||
return $this->nodes[(int) $resource->getId()];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -66,6 +71,10 @@ class ResourceProvider implements IProvider {
|
|||
if (isset($this->nodes[(int) $resource->getId()])) {
|
||||
return $this->nodes[(int) $resource->getId()]->getPath();
|
||||
}
|
||||
$node = $this->getNode($resource);
|
||||
if ($node) {
|
||||
return $node->getName();
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue