V14: Unpublish multiple cultures (#15789)
* Refactor to accept multiple cultures * Add test * Move logic into service * Remember to complete scope * Move scope creation. * Add test * Close scope on early return * Handle invalid cultures with bad request * Handle valid cultures based on content * Change return type if a culture is required * Refactor content publishing service to have 1 unpublish method * Update tests * Return better error * Scope completes --------- Co-authored-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
@@ -380,7 +380,7 @@ public static class ContentRepositoryExtensions
|
||||
|
||||
var keepProcessing = true;
|
||||
|
||||
if (culture == "*")
|
||||
if (culture == "*" || (content.ContentType.VariesByCulture() is false && culture is null))
|
||||
{
|
||||
// all cultures
|
||||
content.ClearPublishInfos();
|
||||
|
||||
Reference in New Issue
Block a user