summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/encryption/lib/keymanager.php6
-rw-r--r--apps/files_trashbin/lib/trashbin.php27
-rw-r--r--apps/files_versions/lib/storage.php14
3 files changed, 0 insertions, 47 deletions
diff --git a/apps/encryption/lib/keymanager.php b/apps/encryption/lib/keymanager.php
index 68fb722c5ea..d9b670c3f5a 100644
--- a/apps/encryption/lib/keymanager.php
+++ b/apps/encryption/lib/keymanager.php
@@ -375,10 +375,6 @@ class KeyManager {
$keyPair = $this->crypt->createKeyPair();
- // Disable encryption proxy to prevent recursive calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
// Save public key
$this->setPublicKey($user, $keyPair['publicKey']);
@@ -395,8 +391,6 @@ class KeyManager {
} else {
$this->log->error('Encryption Could not update users encryption password');
}
-
- \OC_FileProxy::$enabled = $proxyStatus;
}
}
}
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;
}
}
diff --git a/apps/files_versions/lib/storage.php b/apps/files_versions/lib/storage.php
index 01a7935c0c5..125fb5d983c 100644
--- a/apps/files_versions/lib/storage.php
+++ b/apps/files_versions/lib/storage.php
@@ -160,18 +160,11 @@ class Storage {
self::scheduleExpire($filename, $versionsSize, $neededSpace);
- // disable proxy to prevent multiple fopen calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
// store a new version of a file
$mtime = $users_view->filemtime('files/' . $filename);
$users_view->copy('files/' . $filename, 'files_versions/' . $filename . '.v' . $mtime);
// call getFileInfo to enforce a file cache entry for the new version
$users_view->getFileInfo('files_versions/' . $filename . '.v' . $mtime);
-
- // reset proxy state
- \OC_FileProxy::$enabled = $proxyStatus;
}
}
@@ -283,15 +276,8 @@ class Storage {
$version = 'files_versions'.$filename.'.v'.$users_view->filemtime('files'.$filename);
if ( !$users_view->file_exists($version)) {
- // disable proxy to prevent multiple fopen calls
- $proxyStatus = \OC_FileProxy::$enabled;
- \OC_FileProxy::$enabled = false;
-
$users_view->copy('files'.$filename, 'files_versions'.$filename.'.v'.$users_view->filemtime('files'.$filename));
- // reset proxy state
- \OC_FileProxy::$enabled = $proxyStatus;
-
$versionCreated = true;
}