Fixes PublishingStrategy - It will still check if it's expired even if the event isn't cancelled. It now adheres

to some rules about publishing the children if a parent's publishing has failed or was cancelled. Have written unit
tests for these too.
This commit is contained in:
Shannon Deminick
2013-02-09 06:05:35 +06:00
parent 2ecc978591
commit b80415b34e
6 changed files with 236 additions and 84 deletions

View File

@@ -6,6 +6,7 @@ using System.Text;
using System.Web.Mvc;
using Umbraco.Core.IO;
using Umbraco.Core.Logging;
using Umbraco.Core.Services;
using Umbraco.Web.Cache;
using Umbraco.Web.Macros;
using Umbraco.Web.Mvc;
@@ -32,8 +33,13 @@ namespace Umbraco.Web.WebServices
[HttpPost]
public JsonResult PublishDocument(int documentId, bool publishChildren)
{
//var doc = Services.ContentService.GetById(documentId);
//if (Services.ContentService.PublishWithChildren(doc, UmbracoUser.Id))
var doc = Services.ContentService.GetById(documentId);
var result = ((ContentService)Services.ContentService).PublishWithChildren(doc, true, UmbracoUser.Id);
if (Services.ContentService.PublishWithChildren(doc, UmbracoUser.Id))
{
}
return null;
}
}