Skip to content

Commit 437e661

Browse files
committed
Use hosted_drupal_site bundle.
1 parent 41b143d commit 437e661

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Modules/hosting_site/src/Form/CreateSiteForm.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use Drupal\Core\Form\FormBase;
88
use Drupal\Core\Form\FormStateInterface;
9+
use Drupal\hosting_site\Entity\SiteEntity\HostedDrupalSite;
910
use Drupal\hosting_site\Entity\SiteEntity\HostedSite;
1011
use Drupal\site\Entity\SiteEntity;
1112

@@ -59,7 +60,7 @@ public function validateForm(array &$form, FormStateInterface $form_state): void
5960
$form_state->setErrorByName('code', $this->t('The site name %name is not available.', ['%name' => $form_state->getValue('name')]));
6061
}
6162

62-
$site = HostedSite::create([
63+
$site = HostedDrupalSite::create([
6364
'type' => 'hosted_drupal_site',
6465
'site_uri' => $full_url,
6566
]);

web/sites/default/settings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@
921921
// Lookup site based on URI.
922922
$conn = new PDO("mysql:host=$database_hostname;dbname=$database", $username, $password);
923923

924-
$sql = "SELECT * FROM site__site_uri s LEFT JOIN operations_site os ON s.entity_id = os.sid WHERE site_uri_value IN (:site_url, :site_url_https) AND s.bundle = 'hosted_site' ORDER BY entity_id DESC";
924+
$sql = "SELECT * FROM site__site_uri s LEFT JOIN operations_site os ON s.entity_id = os.sid WHERE site_uri_value IN (:site_url, :site_url_https) AND s.bundle = 'hosted_drupal_site' ORDER BY entity_id DESC";
925925

926926
$query = $conn->prepare($sql, []);
927927
$query->execute([

0 commit comments

Comments
 (0)