Fixes test, removes nested scope
This commit is contained in:
@@ -943,12 +943,8 @@ namespace Umbraco.Core.Services.Implement
|
||||
|
||||
// finally, "save publishing"
|
||||
// what happens next depends on whether the content can be published or not
|
||||
using (var scope = ScopeProvider.CreateScope())
|
||||
{
|
||||
var saved = SavePublishing(content, userId);
|
||||
scope.Complete();
|
||||
return saved;
|
||||
}
|
||||
var saved = SavePublishing(content, userId);
|
||||
return saved;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -2324,7 +2320,7 @@ namespace Umbraco.Core.Services.Implement
|
||||
// be changed to Unpublished and any culture currently published will not be visible.
|
||||
if (variesByCulture)
|
||||
{
|
||||
if (culturesPublishing.Count == 0 && culturesUnpublishing.Count == 0) // no published cultures = cannot be published
|
||||
if (content.Published && culturesPublishing.Count == 0 && culturesUnpublishing.Count == 0) // no published cultures = cannot be published
|
||||
return new PublishResult(PublishResultType.FailedPublishNothingToPublish, evtMsgs, content);
|
||||
|
||||
// missing mandatory culture = cannot be published
|
||||
|
||||
@@ -20,10 +20,12 @@
|
||||
/// <summary>
|
||||
/// The item was already published.
|
||||
/// </summary>
|
||||
SuccessPublishAlready = 2,
|
||||
SuccessPublishAlready = 2,
|
||||
|
||||
#endregion
|
||||
|
||||
#region Success - Unpublish
|
||||
|
||||
/// <summary>
|
||||
/// The unpublishing was successful.
|
||||
/// </summary>
|
||||
@@ -43,9 +45,13 @@
|
||||
/// The specified variant was a mandatory culture therefore it was unpublished and the content item itself is unpublished
|
||||
/// </summary>
|
||||
SuccessUnpublishMandatoryCulture = 6,
|
||||
|
||||
#endregion
|
||||
|
||||
//TODO: WE need something like SuccessPublishCultureMixed, FailedPublishCultureMixed - for when a culture is published and another is unpublished at the same time
|
||||
|
||||
#region Failed - Publish
|
||||
|
||||
/// <summary>
|
||||
/// The operation failed.
|
||||
/// </summary>
|
||||
@@ -105,6 +111,7 @@
|
||||
/// Some mandatory cultures are missing.
|
||||
/// </summary>
|
||||
FailedPublishMandatoryCultureMissing = FailedPublish | 10, // in ContentService.SavePublishing
|
||||
|
||||
#endregion
|
||||
|
||||
#region Failed - Unpublish
|
||||
|
||||
Reference in New Issue
Block a user