diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-03-30 22:45:58 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-07 13:30:28 +0200 |
commit | 1b42b492dce562596b8b57a11546728f697c4f38 (patch) | |
tree | 6280aa40baaf55db44edf84a906b83db2d47fc46 /apps/files_trashbin/lib | |
parent | dbdd754c3fc37dc3100a9741f956d913e6d64576 (diff) | |
download | nextcloud-server-1b42b492dce562596b8b57a11546728f697c4f38.tar.gz nextcloud-server-1b42b492dce562596b8b57a11546728f697c4f38.zip |
kill OC_FileProxy :boom:
Diffstat (limited to 'apps/files_trashbin/lib')
-rw-r--r-- | apps/files_trashbin/lib/trashbin.php | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php index 6bdbac49aa7..8d352e36311 100644 --- a/apps/files_trashbin/lib/trashbin.php +++ b/apps/files_trashbin/lib/trashbin.php @@ -183,8 +183,6 @@ class Trashbin { $userTrashSize = self::getTrashbinSize($user); // disable proxy to prevent recursive calls - $proxyStatus = \OC_FileProxy::$enabled; - \OC_FileProxy::$enabled = false; $trashPath = '/files_trashbin/files/' . $filename . '.d' . $timestamp; try { $sizeOfAddedFiles = $view->filesize('/files/' . $file_path); @@ -199,7 +197,6 @@ class Trashbin { } \OC_Log::write('files_trashbin', 'Couldn\'t move ' . $file_path . ' to the trash bin', \OC_log::ERROR); } - \OC_FileProxy::$enabled = $proxyStatus; if ($view->file_exists('/files/' . $file_path)) { // failed to delete the original file, abort $view->unlink($trashPath); @@ -251,10 +248,6 @@ class Trashbin { $size = 0; if (\OCP\App::isEnabled('files_versions')) { - // disable proxy to prevent recursive calls - $proxyStatus = \OC_FileProxy::$enabled; - \OC_FileProxy::$enabled = false; - $user = \OCP\User::getUser(); $rootView = new \OC\Files\View('/'); @@ -279,9 +272,6 @@ class Trashbin { $rootView->rename($owner . '/files_versions' . $v['path'] . '.v' . $v['version'], $user . '/files_trashbin/versions/' . $filename . '.v' . $v['version'] . '.d' . $timestamp); } } - - // enable proxy - \OC_FileProxy::$enabled = $proxyStatus; } return $size; @@ -369,10 +359,6 @@ class Trashbin { $target = \OC\Files\Filesystem::normalizePath('files/' . $location . '/' . $uniqueFilename); $mtime = $view->filemtime($source); - // disable proxy to prevent recursive calls - $proxyStatus = \OC_FileProxy::$enabled; - \OC_FileProxy::$enabled = false; - // restore file $restoreResult = $view->rename($source, $target); @@ -393,15 +379,9 @@ class Trashbin { $query->execute(array($user, $filename, $timestamp)); } - // enable proxy - \OC_FileProxy::$enabled = $proxyStatus; - return true; } - // enable proxy - \OC_FileProxy::$enabled = $proxyStatus; - return false; } @@ -419,9 +399,6 @@ class Trashbin { private static function restoreVersions(\OC\Files\View $view, $file, $filename, $uniqueFilename, $location, $timestamp) { if (\OCP\App::isEnabled('files_versions')) { - // disable proxy to prevent recursive calls - $proxyStatus = \OC_FileProxy::$enabled; - \OC_FileProxy::$enabled = false; $user = \OCP\User::getUser(); $rootView = new \OC\Files\View('/'); @@ -432,7 +409,6 @@ class Trashbin { // file has been deleted in between if (empty($ownerPath)) { - \OC_FileProxy::$enabled = $proxyStatus; return false; } @@ -453,9 +429,6 @@ class Trashbin { } } } - - // enable proxy - \OC_FileProxy::$enabled = $proxyStatus; } } |