|
|
@@ -800,9 +800,12 @@ class SiteController extends ActionController
|
|
|
*/
|
|
|
public function deleteSiteAction(int $organizationId, bool $hard=false, bool $redirectToParent=true, bool $force = false): int
|
|
|
{
|
|
|
- $website = $this->otWebsiteRepository->getWebsiteByOrganizationId($organizationId);
|
|
|
+ $withRestrictions = !$hard; // Une suppression 'hard' doit ignorer les restrictions pour pouvoir
|
|
|
+ // aussi supprimer définitivement un site déjà soft-deleted
|
|
|
+
|
|
|
+ $website = $this->otWebsiteRepository->getWebsiteByOrganizationId($organizationId, $withRestrictions);
|
|
|
$websiteUid = $website['uid'];
|
|
|
- $rootUid = $this->otWebsiteRepository->getWebsiteRootUid($website['uid']);
|
|
|
+ $rootUid = $this->otWebsiteRepository->getWebsiteRootUid($website['uid'], $withRestrictions);
|
|
|
|
|
|
$queryBuilder = $this->connectionPool->getQueryBuilderForTable('pages');
|
|
|
$isDeleted = $queryBuilder
|