diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-03-31 18:24:53 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2014-03-31 18:24:53 +0200 |
commit | c578ab68fe133abdd1519810be642c4b27aed6c3 (patch) | |
tree | 0cfa9b42bfb334e32a13d7b718f9d49cd6a601d7 /apps/files_encryption | |
parent | ab696edba685cd6d2a64c2e48907f03197aae53f (diff) | |
download | nextcloud-server-c578ab68fe133abdd1519810be642c4b27aed6c3.tar.gz nextcloud-server-c578ab68fe133abdd1519810be642c4b27aed6c3.zip |
there is no need to re-calculate the shares after a touch
Diffstat (limited to 'apps/files_encryption')
-rw-r--r-- | apps/files_encryption/lib/proxy.php | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index 6549273c8f1..3f59a99eea9 100644 --- a/apps/files_encryption/lib/proxy.php +++ b/apps/files_encryption/lib/proxy.php @@ -207,16 +207,6 @@ class Proxy extends \OC_FileProxy { } /** - * @param $path - * @return bool - */ - public function postTouch($path) { - $this->handleFile($path); - - return true; - } - - /** * @brief remember initial fopen mode because sometimes it gets changed during the request * @param string $path path * @param string $mode type of access @@ -404,39 +394,4 @@ class Proxy extends \OC_FileProxy { return $size; } - /** - * @param $path - */ - public function handleFile($path) { - - // Disable encryption proxy to prevent recursive calls - $proxyStatus = \OC_FileProxy::$enabled; - \OC_FileProxy::$enabled = false; - - $view = new \OC_FilesystemView('/'); - $session = new \OCA\Encryption\Session($view); - $userId = Helper::getUser($path); - $util = new Util($view, $userId); - - // split the path parts - $pathParts = explode('/', $path); - - // get relative path - $relativePath = \OCA\Encryption\Helper::stripUserFilesPath($path); - - // only if file is on 'files' folder fix file size and sharing - if (isset($pathParts[2]) && $pathParts[2] === 'files' && $util->fixFileSize($path)) { - - // get sharing app state - $sharingEnabled = \OCP\Share::isEnabled(); - - // get users - $usersSharing = $util->getSharingUsersArray($sharingEnabled, $relativePath); - - // update sharing-keys - $util->setSharedFileKeyfiles($session, $usersSharing, $relativePath); - } - - \OC_FileProxy::$enabled = $proxyStatus; - } } |