Skip to content

Commit 4925e7d

Browse files
committed
ACMS-3508: PR feedback work to update the logic.
1 parent c12a94c commit 4925e7d

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

settings/config.settings.php

+12-4
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,19 @@
3737

3838
// phpcs:ignore
3939
// Config sync settings.
40-
$settings['config_sync_directory'] = !$drs_override_config_directories ?
41-
"../config/$site_name" : "../config/default";
40+
// if $settings['config_sync_directory'] isn't set by user the DRS
41+
// set to the ../config/$site_name and if $drs_override_config_directories
42+
// is TRUE then it sets to ../config/default.
43+
$config_settings = $settings['config_sync_directory'] ?? "../config/$site_name";
44+
$settings['config_sync_directory'] = !$drs_override_config_directories ? $config_settings : "../config/default";
45+
4246
// Site Studio sync settings.
43-
$settings['site_studio_sync'] = !$drs_override_site_studio_sync_directories ?
44-
"../sitestudio/$site_name" : "../sitestudio/default";
47+
// if $settings['site_studio_sync'] isn't set by user the DRS
48+
// set to the ../sitestudio/$site_name and if
49+
// $drs_override_site_studio_sync_directories is TRUE
50+
// then it sets to ../sitestudio/default.
51+
$site_studio_config_settings = $settings['site_studio_sync'] ?? "../sitestudio/$site_name";
52+
$settings['site_studio_sync'] = !$drs_override_site_studio_sync_directories ? $site_studio_config_settings : "../sitestudio/default";
4553

4654
$split_filename_prefix = 'config_split.config_split';
4755

0 commit comments

Comments
 (0)