diff --git a/settings/config.settings.php b/settings/config.settings.php index cc9347153..ee26fe158 100644 --- a/settings/config.settings.php +++ b/settings/config.settings.php @@ -70,4 +70,4 @@ global $_acsf_site_name; if (isset($_acsf_site_name)) { $config["$split_filename_prefix.$_acsf_site_name"]['status'] = TRUE; -} \ No newline at end of file +} diff --git a/src/Robo/Commands/Blt/MigrateToDrsCommand.php b/src/Robo/Commands/Blt/MigrateToDrsCommand.php index b17d9cf42..8173360d0 100644 --- a/src/Robo/Commands/Blt/MigrateToDrsCommand.php +++ b/src/Robo/Commands/Blt/MigrateToDrsCommand.php @@ -121,14 +121,18 @@ private function processSettingsFile(string $site): void { */ private function updateSettingsFile(string $settingFile): void { $fileContent = file_get_contents($settingFile); - // Let remove BLT require section from settings.php. $settingsFileContent = str_replace($this->bltSettingsWarning, '', $fileContent); if (substr_count($fileContent, $this->drsSettingsWarning) < 1) { $settingsFileContent = str_replace($this->bltSettingsWarning, $this->drsSettingsWarning, $fileContent); } + $bltConfigOverride = '$blt_override_config_directories'; + // Check whether $blt_override_config_directories variable exists. + if (substr_count($settingsFileContent, $bltConfigOverride) < 1) { + $settingsFileContent = str_replace($bltConfigOverride, '$drs_override_config_directories', $settingsFileContent); + } - file_put_contents($settingFile, $fileContent); + file_put_contents($settingFile, $settingsFileContent); } /**