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 /lib/private/cache | |
parent | dbdd754c3fc37dc3100a9741f956d913e6d64576 (diff) | |
download | nextcloud-server-1b42b492dce562596b8b57a11546728f697c4f38.tar.gz nextcloud-server-1b42b492dce562596b8b57a11546728f697c4f38.zip |
kill OC_FileProxy :boom:
Diffstat (limited to 'lib/private/cache')
-rw-r--r-- | lib/private/cache/file.php | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/lib/private/cache/file.php b/lib/private/cache/file.php index 8874acbb1e5..c70698eb7f8 100644 --- a/lib/private/cache/file.php +++ b/lib/private/cache/file.php @@ -67,13 +67,10 @@ class File { */ public function get($key) { $result = null; - $proxyStatus = \OC_FileProxy::$enabled; - \OC_FileProxy::$enabled = false; if ($this->hasKey($key)) { $storage = $this->getStorage(); $result = $storage->file_get_contents($key); } - \OC_FileProxy::$enabled = $proxyStatus; return $result; } @@ -85,13 +82,10 @@ class File { */ public function size($key) { $result = 0; - $proxyStatus = \OC_FileProxy::$enabled; - \OC_FileProxy::$enabled = false; if ($this->hasKey($key)) { $storage = $this->getStorage(); $result = $storage->filesize($key); } - \OC_FileProxy::$enabled = $proxyStatus; return $result; } @@ -101,7 +95,6 @@ class File { public function set($key, $value, $ttl = 0) { $storage = $this->getStorage(); $result = false; - $proxyStatus = \OC_FileProxy::$enabled; // unique id to avoid chunk collision, just in case $uniqueId = \OC::$server->getSecureRandom()->getLowStrengthGenerator()->generate( 16, @@ -111,7 +104,6 @@ class File { // use part file to prevent hasKey() to find the key // while it is being written $keyPart = $key . '.' . $uniqueId . '.part'; - \OC_FileProxy::$enabled = false; if ($storage and $storage->file_put_contents($keyPart, $value)) { if ($ttl === 0) { $ttl = 86400; // 60*60*24 @@ -119,7 +111,6 @@ class File { $result = $storage->touch($keyPart, time() + $ttl); $result &= $storage->rename($keyPart, $key); } - \OC_FileProxy::$enabled = $proxyStatus; return $result; } |