Skip to content

Commit

Permalink
Use hosted_drupal_site bundle.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonpugh committed Aug 30, 2024
1 parent 41b143d commit 437e661
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Modules/hosting_site/src/Form/CreateSiteForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\hosting_site\Entity\SiteEntity\HostedDrupalSite;
use Drupal\hosting_site\Entity\SiteEntity\HostedSite;
use Drupal\site\Entity\SiteEntity;

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

$site = HostedSite::create([
$site = HostedDrupalSite::create([
'type' => 'hosted_drupal_site',
'site_uri' => $full_url,
]);
Expand Down
2 changes: 1 addition & 1 deletion web/sites/default/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@
// Lookup site based on URI.
$conn = new PDO("mysql:host=$database_hostname;dbname=$database", $username, $password);

$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";
$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";

$query = $conn->prepare($sql, []);
$query->execute([
Expand Down

0 comments on commit 437e661

Please sign in to comment.