Skip to content

Commit

Permalink
simplified str_replace using needle array suggested by danepowell (#86)
Browse files Browse the repository at this point in the history
Co-authored-by: Dane Powell <[email protected]>
  • Loading branch information
ssu-carlsoni and danepowell authored Jun 25, 2024
1 parent eabd469 commit fb79297
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/FilePaths.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ public static function ahSettingsFile(string $ah_group, string $site_name) {
$site_name = $ah_group;
}

// Acquia Cloud does not support periods in db names.
$site_name = str_replace('.', '_', $site_name);
// Acquia Cloud does not support hyphens in db names.
$site_name = str_replace('-', '_', $site_name);
// Acquia Cloud does not support periods or hyphens in db names.
$site_name = str_replace(['.','-'], '_', $site_name);

return "/var/www/site-php/$ah_group/$site_name-settings.inc";
}
Expand Down

0 comments on commit fb79297

Please sign in to comment.