Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormichag86 <michag86@users.noreply.github.com>2017-03-10 11:25:22 +0300
committerGitHub <noreply@github.com>2017-03-10 11:25:22 +0300
commitc72f22e18018925f4be9e007bbac0ce2fba6cc9d (patch)
treea8dd4aae7dfd3da7e48e7137b0b2ee672d138e6a /lib
parentdca04f1f02a1517a907ddf0ba81d03af452ccee6 (diff)
Make files_versions work again
Added some lines which were lost after rewrite with version 1.1.22.
Diffstat (limited to 'lib')
-rw-r--r--lib/Controller/WopiController.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Controller/WopiController.php b/lib/Controller/WopiController.php
index 561305e0..c1e3eb86 100644
--- a/lib/Controller/WopiController.php
+++ b/lib/Controller/WopiController.php
@@ -184,6 +184,9 @@ class WopiController extends Controller {
$userFolder = $this->rootFolder->getUserFolder($res['owner']);
$file = $userFolder->getById($fileId)[0];
$content = fopen('php://input', 'rb');
+ // Setup the FS which is needed to emit hooks (versioning).
+ \OC_Util::tearDownFS();
+ \OC_Util::setupFS($res['owner']);
$file->putContent($content);
return new JSONResponse();
} catch (\Exception $e) {