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:
authorJulius Härtl <jus@bitgrid.net>2020-01-22 20:20:15 +0300
committerJulius Härtl <jus@bitgrid.net>2020-01-22 20:20:15 +0300
commit15cd7adbbd2170407125c83bfe05332df98a917d (patch)
treed04ee744506c9b4d36a90a482abda8c0e80a26b1 /lib
parentc332a6725048d9158384fe3f6605ddfac67b3a4f (diff)
Remove template id after first save
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/Controller/WopiController.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Controller/WopiController.php b/lib/Controller/WopiController.php
index cca4607d..daf4e7d6 100644
--- a/lib/Controller/WopiController.php
+++ b/lib/Controller/WopiController.php
@@ -467,7 +467,10 @@ class WopiController extends Controller {
return new JSONResponse([ 'Name' => $file->getName(), 'Url' => $url ], Http::STATUS_OK);
}
-
+ if ($wopi->hasTemplateId()) {
+ $wopi->setTemplateId(null);
+ $this->wopiMapper->update($wopi);
+ }
return new JSONResponse(['LastModifiedTime' => Helper::toISO8601($file->getMTime())]);
} catch (\Exception $e) {
$this->logger->logException($e, ['level' => ILogger::ERROR, 'app' => 'richdocuments', 'message' => 'getFile failed']);