Merge remote-tracking branch 'origin/6.2.0' into 7.1.0
Conflicts: src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/moveOrCopy.aspx.cs
This commit is contained in:
@@ -145,6 +145,9 @@ namespace umbraco.dialogs
|
||||
|
||||
private void HandleDocumentTypeCopy()
|
||||
{
|
||||
|
||||
//TODO: This should be a method on the service!!!
|
||||
|
||||
var contentTypeService = ApplicationContext.Current.Services.ContentTypeService;
|
||||
var contentType = contentTypeService.GetContentType(
|
||||
int.Parse(Request.GetItemAsString("id")));
|
||||
@@ -152,6 +155,20 @@ namespace umbraco.dialogs
|
||||
var alias = rename.Text.Trim().Replace("'", "''");
|
||||
var clone = ((Umbraco.Core.Models.ContentType) contentType).Clone(alias);
|
||||
clone.Name = rename.Text.Trim();
|
||||
|
||||
//set the master
|
||||
//http://issues.umbraco.org/issue/U4-2843
|
||||
//http://issues.umbraco.org/issue/U4-3552
|
||||
var parent = int.Parse(masterType.SelectedValue);
|
||||
if (parent > 0)
|
||||
{
|
||||
clone.ParentId = parent;
|
||||
}
|
||||
else
|
||||
{
|
||||
clone.ParentId = -1;
|
||||
}
|
||||
|
||||
contentTypeService.Save(clone);
|
||||
|
||||
var returnUrl = string.Format("{0}/settings/editNodeTypeNew.aspx?id={1}", SystemDirectories.Umbraco, clone.Id);
|
||||
|
||||
Reference in New Issue
Block a user