Merge branch 'contrib' into v15/dev
This commit is contained in:
@@ -2406,8 +2406,6 @@ public class ContentService : RepositoryService, IContentService
|
||||
|
||||
using (ICoreScope scope = ScopeProvider.CreateCoreScope())
|
||||
{
|
||||
var parentId = content.ParentId;
|
||||
|
||||
scope.WriteLock(Constants.Locks.ContentTree);
|
||||
|
||||
var originalPath = content.Path;
|
||||
@@ -2440,14 +2438,6 @@ public class ContentService : RepositoryService, IContentService
|
||||
movingToRecycleBinNotification));
|
||||
Audit(AuditType.Move, userId, content.Id, "Moved to recycle bin");
|
||||
|
||||
// sort the children of the parent after deleting the content
|
||||
IQuery<IContent> childQuery = Query<IContent>().Where(x => x.ParentId == parentId && x.Id != content.Id);
|
||||
IEnumerable<IContent> children = _documentRepository.Get(childQuery);
|
||||
if(children.Any())
|
||||
{
|
||||
Sort(children, userId);
|
||||
}
|
||||
|
||||
scope.Complete();
|
||||
}
|
||||
|
||||
@@ -2469,8 +2459,6 @@ public class ContentService : RepositoryService, IContentService
|
||||
{
|
||||
EventMessages eventMessages = EventMessagesFactory.Get();
|
||||
|
||||
var parentIdBeforeMove = content.ParentId;
|
||||
|
||||
if (content.ParentId == parentId)
|
||||
{
|
||||
return OperationResult.Succeed(eventMessages);
|
||||
@@ -2535,14 +2523,6 @@ public class ContentService : RepositoryService, IContentService
|
||||
|
||||
Audit(AuditType.Move, userId, content.Id);
|
||||
|
||||
// sort the children of the old parent after moving the content
|
||||
IQuery<IContent> childQuery = Query<IContent>().Where(x => x.ParentId == parentIdBeforeMove && x.Id != content.Id);
|
||||
IEnumerable<IContent> children = _documentRepository.Get(childQuery);
|
||||
if (children.Any())
|
||||
{
|
||||
Sort(children, userId);
|
||||
}
|
||||
|
||||
scope.Complete();
|
||||
return OperationResult.Succeed(eventMessages);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user