Ability to force the version of onlyoffice

This commit is contained in:
yflory
2020-01-22 11:55:27 +01:00
parent 746b382166
commit ad8bf87c3f
2 changed files with 7 additions and 2 deletions

View File

@@ -81,7 +81,7 @@ define([
hashes: {},
ids: {},
mediasSources: {},
version: NEW_VERSION
version: privateData.ooForceVersion ? Number(privateData.ooForceVersion) : NEW_VERSION
};
var oldHashes = {};
var oldIds = {};
@@ -1437,7 +1437,11 @@ define([
var version = '';
// Old version detected: use the old OO and start the migration if we can
if (content && !content.version) {
if (privateData.ooForceVersion) {
if (privateData.ooForceVersion === "1") {
version = "v1/";
}
} else if (content && (!content.version || content.version === 1)) {
version = 'v1/';
APP.migrate = true;
// Registedred users can start the migration