The purpose of MW_USE_LEGACY_DEFAULT_SETTINGS was to allow Setup.php to load default values from DefaultSettings.php, instead of using MainConfigSchema. It was put into place for the benefit of third-party installations that encounter issues with using MainConfigSchema. No such issues have been reported, so we can remove the compatibility switch in 1.40. The use of DefaultSettings.php as been deprecated since 1.39, but there are still several extensions that rely on loading it. It remains a stub for MainConfigSchema::listDefaultValues() for now. Change-Id: I280f80e5be15fbcd809596087b299add5f83af1f
30 lines
835 B
PHP
30 lines
835 B
PHP
<?php
|
|
/**
|
|
* THIS IS A DEPRECATED STUB FILE!
|
|
*
|
|
* Default settings are now defined in the MainConfigSchema class.
|
|
*
|
|
* To get default values for configuration variables, use MainConfigSchema::listDefaultValues()
|
|
* or MainConfigSchema::getDefaultValue().
|
|
*
|
|
* @file
|
|
* @deprecated since 1.39
|
|
*/
|
|
|
|
use MediaWiki\MainConfigSchema;
|
|
|
|
if ( function_exists( 'wfDeprecatedMsg' ) ) {
|
|
wfDeprecatedMsg(
|
|
'DefaultSettings.php is deprecated and will be removed. '
|
|
. 'Use MainConfigSchema::listDefaultValues() or MainConfigSchema::getDefaultValue() instead.',
|
|
'1.39'
|
|
);
|
|
}
|
|
|
|
// Extract the defaults into the current scope
|
|
foreach ( MainConfigSchema::listDefaultValues( 'wg' ) as $defaultSettingsVar => $defaultSettingsValue ) {
|
|
$$defaultSettingsVar = $defaultSettingsValue;
|
|
}
|
|
|
|
unset( $defaultSettingsVar );
|
|
unset( $defaultSettingsValue );
|