소스 검색

https://assistance.opentalent.fr/browse/V8-1916

Olivier Massot 4 년 전
부모
커밋
179e5c5801
1개의 변경된 파일1개의 추가작업 그리고 17개의 파일을 삭제
  1. 1 17
      ot_admin/Classes/Controller/SiteController.php

+ 1 - 17
ot_admin/Classes/Controller/SiteController.php

@@ -135,23 +135,7 @@ class SiteController extends ActionController
 
         $isNetwork = $organizationExtraData['category'] == 'NETWORK';
 
-        // ** Test the existence of a website with this name and or organization id
-
-        // Is there a site with this organization's name?
-        $queryBuilder = $this->connectionPool->getQueryBuilderForTable('pages');
-        $queryBuilder->getRestrictions()->removeAll();
-        $queryBuilder
-            ->select('uid')
-            ->from('pages')
-            ->where($queryBuilder->expr()->eq('title', $queryBuilder->createNamedParameter($organization->getName())))
-            ->andWhere('is_siteroot=1');
-        $statement = $queryBuilder->execute();
-
-        if ($statement->rowCount() > 0) {
-            throw new \RuntimeException('A website with this name already exists: ' . $organization->getName() . "\n(if you can't see it, it might have been soft-deleted)");
-        }
-
-        // Is there a site with this organization's id?
+        // Is there already a website with this organization's id?
         $queryBuilder = $this->connectionPool->getQueryBuilderForTable('pages');
         $queryBuilder->getRestrictions()->removeAll();
         $statement = $queryBuilder