summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-04-02 18:23:33 +0200
committerVincent Petry <pvince81@owncloud.com>2014-04-02 18:23:33 +0200
commita6de5efbab351e88adeff0f0a988a18a800f9a50 (patch)
tree7cced0c5458421e882691c4661385638753aa285 /apps/files_encryption
parent16d10844cd01dc89f864cda6bde5169812e89b62 (diff)
parentc578ab68fe133abdd1519810be642c4b27aed6c3 (diff)
downloadnextcloud-server-a6de5efbab351e88adeff0f0a988a18a800f9a50.tar.gz
nextcloud-server-a6de5efbab351e88adeff0f0a988a18a800f9a50.zip
Merge pull request #7978 from owncloud/enc_cleanup
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.php45
1 files changed, 0 insertions, 45 deletions
diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php
index 8fd51178285..ae2d8d63e23 100644
--- a/apps/files_encryption/lib/proxy.php
+++ b/apps/files_encryption/lib/proxy.php
@@ -211,16 +211,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
@@ -376,39 +366,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;
- }
}