diff --git a/core/includes/install.inc b/core/includes/install.inc index e397dc4..b9ae3bd 100644 --- a/core/includes/install.inc +++ b/core/includes/install.inc @@ -612,6 +612,10 @@ function drupal_verify_profile($install_state) { * * Separated from the installation of other modules so core system * functions can be made available while other modules are installed. + * + * @param array $install_state + * An array of information about the current installation state. This is used + * to set the default language. */ function drupal_install_system($install_state) { // Create tables. diff --git a/core/lib/Drupal/Core/Config/Config.php b/core/lib/Drupal/Core/Config/Config.php index b7be985..9c6bd3f 100644 --- a/core/lib/Drupal/Core/Config/Config.php +++ b/core/lib/Drupal/Core/Config/Config.php @@ -664,26 +664,37 @@ public function getRawData() { /** * Gets original data from this configuration object. * + * Original data is the data as it is immediately after loading from + * configuration storage before any changes. If this is a new configuration + * object it will be an empty array. + * * @see \Drupal\Core\Config\Config::get() * + * @param string $key + * A string that maps to a key within the configuration data. + * @param bool $apply_overrides + * Apply any overrides to the original data. Defaults to TRUE. + * * @return mixed * The data that was requested. */ - public function getOriginal($key = '') { + public function getOriginal($key = '', $apply_overrides = TRUE) { if (!$this->isLoaded) { $this->load(); } - // Apply overrides. - $original_data = $this->originalData; - if (isset($this->languageOverrides) && is_array($this->languageOverrides)) { - $original_data = NestedArray::mergeDeepArray(array($original_data, $this->languageOverrides), TRUE); - } - if (isset($this->moduleOverrides) && is_array($this->moduleOverrides)) { - $original_data = NestedArray::mergeDeepArray(array($original_data, $this->moduleOverrides), TRUE); - } - if (isset($this->settingsOverrides) && is_array($this->settingsOverrides)) { - $original_data = NestedArray::mergeDeepArray(array($original_data, $this->settingsOverrides), TRUE); + if ($apply_overrides) { + // Apply overrides. + $original_data = $this->originalData; + if (isset($this->languageOverrides) && is_array($this->languageOverrides)) { + $original_data = NestedArray::mergeDeepArray(array($original_data, $this->languageOverrides), TRUE); + } + if (isset($this->moduleOverrides) && is_array($this->moduleOverrides)) { + $original_data = NestedArray::mergeDeepArray(array($original_data, $this->moduleOverrides), TRUE); + } + if (isset($this->settingsOverrides) && is_array($this->settingsOverrides)) { + $original_data = NestedArray::mergeDeepArray(array($original_data, $this->settingsOverrides), TRUE); + } } if (empty($key)) {