Merge
This commit is contained in:
@@ -699,11 +699,13 @@ namespace umbraco.cms.businesslogic
|
||||
continue;
|
||||
|
||||
//get the propertyId
|
||||
var property = propData
|
||||
.Where(x => x.PropertyTypeId == pt.Id)
|
||||
.SingleOrDefault();
|
||||
var property = propData.SingleOrDefault(x => x.PropertyTypeId == pt.Id);
|
||||
if (property == null)
|
||||
continue;
|
||||
{
|
||||
//continue;
|
||||
var prop = Property.MakeNew(pt, this, Version);
|
||||
property = new { Id = prop.Id, PropertyTypeId = pt.Id };
|
||||
}
|
||||
var propertyId = property.Id;
|
||||
|
||||
Property p = null;
|
||||
|
||||
@@ -1468,6 +1468,7 @@ where published = 1 And nodeId = @nodeId And trashed = 0", SqlHelper.CreateParam
|
||||
{
|
||||
//copy file if it's an upload property (so it doesn't get removed when original doc get's deleted)
|
||||
|
||||
IDataType tagsField = new Factory().GetNewObject(new Guid("4023e540-92f5-11dd-ad8b-0800200c9a66"));
|
||||
IDataType uploadField = new Factory().GetNewObject(new Guid("5032a6e6-69e3-491d-bb28-cd31cd11086c"));
|
||||
|
||||
if (p.PropertyType.DataTypeDefinition.DataType.Id == uploadField.Id
|
||||
@@ -1491,6 +1492,16 @@ where published = 1 And nodeId = @nodeId And trashed = 0", SqlHelper.CreateParam
|
||||
}
|
||||
|
||||
}
|
||||
else if (p.PropertyType.DataTypeDefinition.DataType.Id == tagsField.Id &&
|
||||
p.Value.ToString() != "")
|
||||
{
|
||||
//Find tags from the original and add them to the new document
|
||||
var tags = Tags.Tag.GetTags(this.Id);
|
||||
foreach (var tag in tags)
|
||||
{
|
||||
Tags.Tag.AddTagsToNode(newDoc.Id, tag.TagCaption, tag.Group);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
newDoc.getProperty(p.PropertyType.Alias).Value = p.Value;
|
||||
|
||||
Reference in New Issue
Block a user