diff options
Diffstat (limited to 'environment')
-rw-r--r-- | environment/environment.php | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/environment/environment.php b/environment/environment.php index d116b60a..35504273 100644 --- a/environment/environment.php +++ b/environment/environment.php @@ -57,6 +57,10 @@ class Environment { */ private $userManager; /** + * @var int + */ + private $sharedNodeId; + /** * @var IServerContainer */ private $serverContainer; @@ -122,8 +126,8 @@ class Environment { $this->userFolder = $this->setupFilesystem($origShareOwner); // This is actually the node ID - $fileSource = $linkItem['file_source']; - $this->fromRootToFolder = $this->buildFromRootToFolder($fileSource); + $this->sharedNodeId = $linkItem['file_source']; + $this->fromRootToFolder = $this->buildFromRootToFolder($this->sharedNodeId); $this->folderName = $linkItem['file_target']; $this->userId = $rootLinkItem['uid_owner']; @@ -187,6 +191,15 @@ class Environment { } /** + * Returns the shared node + * + * @return File|Folder + */ + public function getSharedNode() { + return $this->getResourceFromId($this->sharedNodeId); + } + + /** * Returns the resource identified by the given ID * * @param int $resourceId |