Fixes U4-1828 by correctly incrementing the sortorder ... doh!
This commit is contained in:
@@ -267,7 +267,7 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
entity.Path = string.Concat(parent.Path, ",", entity.Id);
|
||||
entity.Level = parent.Level + 1;
|
||||
var maxSortOrder = Database.ExecuteScalar<int>("SELECT coalesce(max(sortOrder),0) FROM umbracoNode WHERE parentid = @ParentId", new { ParentId = entity.ParentId });
|
||||
entity.SortOrder = maxSortOrder;
|
||||
entity.SortOrder = maxSortOrder + 1;
|
||||
}
|
||||
|
||||
var factory = new ContentFactory(NodeObjectTypeId, entity.Id);
|
||||
|
||||
@@ -732,9 +732,9 @@ namespace Umbraco.Core.Services
|
||||
|
||||
if (Moving.IsRaisedEventCancelled(new MoveEventArgs<IContent>(content, parentId), this))
|
||||
return;
|
||||
|
||||
|
||||
content.WriterId = userId;
|
||||
if (parentId == -1)
|
||||
if (parentId == -1)
|
||||
{
|
||||
content.Path = string.Concat("-1,", content.Id);
|
||||
content.Level = 1;
|
||||
|
||||
Reference in New Issue
Block a user