From 9cd9258dbbf1e4c740213c8ab4cc6dfcbbab2a29 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Tue, 3 Jan 2017 20:31:35 +0100 Subject: [PATCH] Append instance id to rev history Signed-off-by: Lukas Reschke --- js/documents.js | 2 +- lib/Controller/DocumentController.php | 2 ++ templates/documents.php | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/js/documents.js b/js/documents.js index 7beebee4..3c44b34b 100644 --- a/js/documents.js +++ b/js/documents.js @@ -119,7 +119,7 @@ var documentsMain = { } // WOPISrc - URL that loolwsd will access (ie. pointing to ownCloud) - var wopiurl = window.location.protocol + '//' + window.location.host + OC.generateUrl('apps/richdocuments/wopi/files/{file_id}', {file_id: fileId}); + var wopiurl = window.location.protocol + '//' + window.location.host + OC.generateUrl('apps/richdocuments/wopi/files/{file_id}_{instanceId}', {file_id: fileId, instanceId: instanceId}); var wopisrc = encodeURIComponent(wopiurl); // urlsrc - the URL from discovery xml that we access for the particular diff --git a/lib/Controller/DocumentController.php b/lib/Controller/DocumentController.php index d8df677a..731f10bc 100644 --- a/lib/Controller/DocumentController.php +++ b/lib/Controller/DocumentController.php @@ -108,6 +108,7 @@ class DocumentController extends Controller { 'token' => $token, 'urlsrc' => $urlSrc, 'path' => '/', + 'instanceId' => $this->settings->getSystemValue('instanceid'), ]; $response = new TemplateResponse('richdocuments', 'documents', $params, 'empty'); @@ -157,6 +158,7 @@ class DocumentController extends Controller { 'token' => $token, 'urlsrc' => $urlSrc, 'path' => '/', + 'instanceId' => $this->settings->getSystemValue('instanceid'), ]; $response = new TemplateResponse('richdocuments', 'documents', $params, 'empty'); diff --git a/templates/documents.php b/templates/documents.php index 41e114e0..6d5dc79a 100644 --- a/templates/documents.php +++ b/templates/documents.php @@ -5,6 +5,7 @@ var richdocuments_token = ''; var richdocuments_urlsrc = ''; var richdocuments_path = ''; + var instanceId = '';