mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
@@ -73,12 +73,16 @@ namespace UpgradeTo14.Controllers {
|
|||||||
|
|
||||||
foreach (ContentItem content in contents) {
|
foreach (ContentItem content in contents) {
|
||||||
|
|
||||||
// copy data to current version record
|
if((content.Record.Data ?? "").Length > (content.VersionRecord.Data ?? "").Length) {
|
||||||
content.VersionRecord.Data = content.Record.Data;
|
|
||||||
var draft = _orchardServices.ContentManager.Get(content.Id, VersionOptions.Draft);
|
var draft = _orchardServices.ContentManager.Get(content.Id, VersionOptions.Draft);
|
||||||
|
|
||||||
if(draft != null) {
|
if(draft != null) {
|
||||||
draft.VersionRecord.Data = content.Record.Data;
|
draft.VersionRecord.Data = content.Record.Data;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
content.VersionRecord.Data = content.Record.Data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
|
|||||||
Reference in New Issue
Block a user