]> source.dussan.org Git - nextcloud-server.git/commitdiff
there is no need to re-calculate the shares after a touch
authorBjoern Schiessle <schiessle@owncloud.com>
Mon, 31 Mar 2014 16:24:53 +0000 (18:24 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Mon, 31 Mar 2014 16:24:53 +0000 (18:24 +0200)
apps/files_encryption/lib/proxy.php

index 6549273c8f1e5539554548560f5d4b3c8429654f..3f59a99eea951945acc1635542622c6eb01e86ee 100644 (file)
@@ -206,16 +206,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
@@ -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;
-       }
 }