Merge pull request #473 from owncloud/kill-fileproxy
Kill OC_FileProxy references
This commit is contained in:
commit
e6449fdf0e
@ -256,10 +256,7 @@ class SessionController extends Controller{
|
|||||||
$memberCount = count($memberIds) - 1;
|
$memberCount = count($memberIds) - 1;
|
||||||
|
|
||||||
if ($view->file_exists($path)){
|
if ($view->file_exists($path)){
|
||||||
$proxyStatus = \OC_FileProxy::$enabled;
|
|
||||||
\OC_FileProxy::$enabled = false;
|
|
||||||
$currentHash = sha1($view->file_get_contents($path));
|
$currentHash = sha1($view->file_get_contents($path));
|
||||||
\OC_FileProxy::$enabled = $proxyStatus;
|
|
||||||
|
|
||||||
if (!Helper::isVersionsEnabled() && $currentHash !== $session->getGenesisHash()){
|
if (!Helper::isVersionsEnabled() && $currentHash !== $session->getGenesisHash()){
|
||||||
// Original file was modified externally. Save to a new one
|
// Original file was modified externally. Save to a new one
|
||||||
|
@ -45,7 +45,7 @@ define("owncloud/ServerFactory", [
|
|||||||
|
|
||||||
server = new PullBoxServer(args);
|
server = new PullBoxServer(args);
|
||||||
server.getGenesisUrl = function(sid) {
|
server.getGenesisUrl = function(sid) {
|
||||||
return OC.generateUrl('apps/documents/ajax/genesis/{es_id}', {es_id: sid}) + '?requesttoken=' + oc_requesttoken;
|
return OC.generateUrl('apps/documents/ajax/genesis/{es_id}', {es_id: sid}) + '?requesttoken=' + encodeURIComponent(oc_requesttoken);
|
||||||
};
|
};
|
||||||
return server;
|
return server;
|
||||||
};
|
};
|
||||||
|
@ -58,12 +58,7 @@ class Genesis {
|
|||||||
$mimetype = $view->getMimeType($path);
|
$mimetype = $view->getMimeType($path);
|
||||||
|
|
||||||
$data = Filter::read($content, $mimetype);
|
$data = Filter::read($content, $mimetype);
|
||||||
|
|
||||||
$proxyStatus = \OC_FileProxy::$enabled;
|
|
||||||
\OC_FileProxy::$enabled = false;
|
|
||||||
|
|
||||||
$this->view->file_put_contents($this->path, $data['content']);
|
$this->view->file_put_contents($this->path, $data['content']);
|
||||||
\OC_FileProxy::$enabled = $proxyStatus;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -87,12 +82,7 @@ class Genesis {
|
|||||||
|
|
||||||
protected function getDocumentHash($view, $path){
|
protected function getDocumentHash($view, $path){
|
||||||
$this->validate($view, $path);
|
$this->validate($view, $path);
|
||||||
$proxyStatus = \OC_FileProxy::$enabled;
|
|
||||||
\OC_FileProxy::$enabled = false;
|
|
||||||
|
|
||||||
$hash = sha1($view->file_get_contents($path));
|
$hash = sha1($view->file_get_contents($path));
|
||||||
|
|
||||||
\OC_FileProxy::$enabled = $proxyStatus;
|
|
||||||
return $hash;
|
return $hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user