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:
Nikolaj Geisle
2024-02-29 14:38:47 +01:00
committed by GitHub
parent 10c18e4162
commit b8577e3af2
11 changed files with 194 additions and 23 deletions

View File

@@ -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();