diff options
author | Olivier Paroz <github@oparoz.com> | 2015-07-02 23:10:36 +0300 |
---|---|---|
committer | Olivier Paroz <github@oparoz.com> | 2015-07-02 23:10:36 +0300 |
commit | cb5994eba1e359526f6577cb423abd9751a36ee4 (patch) | |
tree | 581ce2936da158914515bcfbc741a61aee250d3e | |
parent | f953bc3599d490ae4703e16c38a8f1636fa3fde8 (diff) |
Remove unnecessary private APIs
As discussed here https://github.com/owncloud/core/issues/17197
-rw-r--r-- | environment/environment.php | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/environment/environment.php b/environment/environment.php index 633a9e07..91a3c191 100644 --- a/environment/environment.php +++ b/environment/environment.php @@ -123,7 +123,10 @@ class Environment { // Resolves reshares down to the last real share $rootLinkItem = Share::resolveReShare($linkItem); $origShareOwner = $rootLinkItem['uid_owner']; - $this->userFolder = $this->setupFilesystem($origShareOwner); + $this->userFolder = $this->serverContainer->getUserFolder($origShareOwner); + // TODO: Replace with this in 8.2 (https://github.com/owncloud/core/pull/16965) + // You get root by calling getRootFolder() on the server container + //$this->userFolder = $this->root->getUserFolder($origShareOwner); // This is actually the node ID $this->sharedNodeId = $linkItem['file_source']; @@ -331,30 +334,6 @@ class Environment { } /** - * Sets up the filesystem for the original share owner so that we can - * retrieve the files and returns the userFolder for that user - * - * We can't use 'UserFolder' from Application as the user is not known - * at instantiation time - * - * @param $origShareOwner - * - * @return Folder - */ - private function setupFilesystem($origShareOwner) { - \OC_Util::tearDownFS(); // FIXME: Private API - \OC_Util::setupFS($origShareOwner); // FIXME: Private API - - $folder = $this->serverContainer->getUserFolder($origShareOwner); - - /*// Alternative which does not exist yet - $user = $this->userManager->get($origShareOwner); - $folder = $user->getUserFolder();*/ - - return $folder; - } - - /** * Returns the path from the shared folder to the root folder in the original * owner's filesystem: /userId/files/parent_folder/shared_folder * |