mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-04-07 14:06:11 +08:00
fix version author when changes exist ( Fix Bug 73505 )
This commit is contained in:
@ -990,7 +990,7 @@ namespace OnlineEditorsExampleMVC
|
|||||||
var changes = jss.Deserialize<Dictionary<string, object>>(File.ReadAllText(changesPath));
|
var changes = jss.Deserialize<Dictionary<string, object>>(File.ReadAllText(changesPath));
|
||||||
var changesArray = (ArrayList)changes["changes"];
|
var changesArray = (ArrayList)changes["changes"];
|
||||||
var change = changesArray.Count > 0
|
var change = changesArray.Count > 0
|
||||||
? (Dictionary<string, object>)changesArray[0]
|
? (Dictionary<string, object>)changesArray[changesArray.Count - 1]
|
||||||
: new Dictionary<string, object>();
|
: new Dictionary<string, object>();
|
||||||
|
|
||||||
// write information about changes to the object
|
// write information about changes to the object
|
||||||
|
|||||||
@ -778,7 +778,7 @@ namespace OnlineEditorsExample
|
|||||||
var changes = jss.Deserialize<Dictionary<string, object>>(File.ReadAllText(changesPath));
|
var changes = jss.Deserialize<Dictionary<string, object>>(File.ReadAllText(changesPath));
|
||||||
var changesArray = (ArrayList)changes["changes"];
|
var changesArray = (ArrayList)changes["changes"];
|
||||||
var change = changesArray.Count > 0
|
var change = changesArray.Count > 0
|
||||||
? (Dictionary<string, object>)changesArray[0]
|
? (Dictionary<string, object>)changesArray[changesArray.Count - 1]
|
||||||
: new Dictionary<string, object>();
|
: new Dictionary<string, object>();
|
||||||
|
|
||||||
// write information about changes to the object
|
// write information about changes to the object
|
||||||
|
|||||||
@ -533,7 +533,7 @@ DocManager.prototype.getHistory = function getHistory(fileName, content, keyVers
|
|||||||
let createdFromJson = null;
|
let createdFromJson = null;
|
||||||
if (fileContent) { // if content is defined
|
if (fileContent) { // if content is defined
|
||||||
if (fileContent.changes && fileContent.changes.length) { // and there are some modifications in the content
|
if (fileContent.changes && fileContent.changes.length) { // and there are some modifications in the content
|
||||||
[contentJson] = fileContent.changes; // write these modifications to the json content
|
contentJson = fileContent.changes[fileContent.changes.length - 1]; // write these modifications to the json content
|
||||||
} else if (fileContent.length) {
|
} else if (fileContent.length) {
|
||||||
[contentJson] = fileContent; // otherwise, write original content to the json content
|
[contentJson] = fileContent; // otherwise, write original content to the json content
|
||||||
oldVersion = true; // and note that this is an old version
|
oldVersion = true; // and note that this is an old version
|
||||||
|
|||||||
Reference in New Issue
Block a user