|
15 | 15 | * directory should be shared between all multi-sites, and each multisite will
|
16 | 16 | * override this selectively using configuration splits. However, some
|
17 | 17 | * applications may prefer to manage the configuration for each multisite
|
18 |
| - * completely separately. If this is the case, they can set |
19 |
| - * $drs_override_config_directories to FALSE and |
20 |
| - * $settings['config_sync_directory'] = $dir . "/config/$site_dir" in |
| 18 | + * completely separately. If this is the case, |
| 19 | + * set FALSE to $drs_override_config_directories |
| 20 | + * and $drs_override_site_studio_sync_directories |
| 21 | + * $settings['config_sync_directory'] = $dir . "/config/$site_dir" |
| 22 | + * $settings['site_studio_sync'] = $dir . "/sitestudio/$site_dir" in |
21 | 23 | * settings.php, and we will not overwrite it.
|
22 | 24 | */
|
23 |
| - |
| 25 | +// phpcs:ignore |
| 26 | +$drs_override_config_directories = $drs_override_config_directories ?? FALSE; |
| 27 | +$drs_override_site_studio_sync_directories = $drs_override_site_studio_sync_directories ?? FALSE; |
24 | 28 |
|
25 | 29 | /**
|
26 | 30 | * Site path.
|
27 | 31 | *
|
28 | 32 | * @var string $site_path
|
29 | 33 | * This is always set and exposed by the Drupal Kernel.
|
30 | 34 | */
|
31 |
| - // phpcs:ignore |
32 |
| - $site_name = EnvironmentDetector::getSiteName($site_path); |
| 35 | +// phpcs:ignore |
| 36 | +$site_name = EnvironmentDetector::getSiteName($site_path); |
| 37 | + |
33 | 38 | // phpcs:ignore
|
34 | 39 | // Config sync settings.
|
35 |
| -$settings['config_sync_directory'] = "../config/" . $site_name; |
| 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 | + |
36 | 46 | // Site Studio sync settings.
|
37 |
| -$settings['site_studio_sync'] = "../sitestudio/" . $site_name; |
| 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"; |
38 | 53 |
|
39 | 54 | $split_filename_prefix = 'config_split.config_split';
|
40 | 55 |
|
|
0 commit comments