Skip to content

Commit

Permalink
versions history don't for external link
Browse files Browse the repository at this point in the history
  • Loading branch information
Antipkin-A committed Oct 27, 2021
1 parent 91ddf39 commit dd4401a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
2 changes: 0 additions & 2 deletions controller/editorcontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,6 @@ public function save($name, $dir, $url) {
* @return array
*
* @NoAdminRequired
* @PublicPage
*/
public function history($fileId, $shareToken = null) {
$this->logger->debug("Request history for: $fileId", ["app" => $this->appName]);
Expand Down Expand Up @@ -788,7 +787,6 @@ public function history($fileId, $shareToken = null) {
* @return array
*
* @NoAdminRequired
* @PublicPage
*/
public function version($fileId, $version, $shareToken = null) {
$this->logger->debug("Request version for: $fileId ($version)", ["app" => $this->appName]);
Expand Down
20 changes: 10 additions & 10 deletions js/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,6 @@
"onMakeActionLink": OCA.Onlyoffice.onMakeActionLink,
};

if (!OCA.Onlyoffice.template) {
config.events.onRequestHistory = OCA.Onlyoffice.onRequestHistory;
config.events.onRequestHistoryData = OCA.Onlyoffice.onRequestHistoryData;
config.events.onRequestRestore = OCA.Onlyoffice.onRequestRestore;

if (!OCA.Onlyoffice.version) {
config.events.onRequestHistoryClose = OCA.Onlyoffice.onRequestHistoryClose;
}
}

if (config.editorConfig.tenant) {
config.events.onAppReady = function () {
OCA.Onlyoffice.docEditor.showMessage(t(OCA.Onlyoffice.AppName, "You are using public demo ONLYOFFICE Docs server. Please do not store private sensitive data."));
Expand All @@ -162,6 +152,16 @@
if (!OCA.Onlyoffice.filePath) {
OCA.Onlyoffice.filePath = config._file_path;
}

if (!OCA.Onlyoffice.template) {
config.events.onRequestHistory = OCA.Onlyoffice.onRequestHistory;
config.events.onRequestHistoryData = OCA.Onlyoffice.onRequestHistoryData;
config.events.onRequestRestore = OCA.Onlyoffice.onRequestRestore;

if (!OCA.Onlyoffice.version) {
config.events.onRequestHistoryClose = OCA.Onlyoffice.onRequestHistoryClose;
}
}
}

if (OCA.Onlyoffice.directEditor || OCA.Onlyoffice.inframe) {
Expand Down

0 comments on commit dd4401a

Please sign in to comment.