|
|
@@ -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
|