diff options
author | Julius Härtl <jus@bitgrid.net> | 2022-10-14 10:42:10 +0300 |
---|---|---|
committer | Julius Härtl (Rebase PR Action) <github@juliushaertl.de> | 2022-10-15 01:14:02 +0300 |
commit | 4baadcde83a8886fdeaa7756b0802f9fd97fc3a1 (patch) | |
tree | d02ef04bf2d2587cb86d5a924d63affae37b6b98 | |
parent | 3ea1f0f6abf9a570f362e1b30417d1c6eebe02fc (diff) |
Do not pass the revision history parameter if files_versions is disabled
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r-- | src/helpers/url.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/helpers/url.js b/src/helpers/url.js index 3054f42e..c179a09b 100644 --- a/src/helpers/url.js +++ b/src/helpers/url.js @@ -33,6 +33,9 @@ const getSearchParam = (name) => { } const getWopiUrl = ({ fileId, title, readOnly, closeButton, revisionHistory }) => { + // Only set the revision history parameter if the versions app is enabled + revisionHistory = revisionHistory && window?.oc_appswebroots?.files_versions + // WOPISrc - URL that loolwsd will access (ie. pointing to ownCloud) // index.php is forced here to avoid different wopi srcs for the same document const wopiurl = window.location.protocol + '//' + window.location.host + getRootUrl() + '/index.php/apps/richdocuments/wopi/files/' + fileId |