wiki.techinc.nl/includes/DefaultSettings.php
daniel 237bbf089f Turn DefaultSettings.php into a deprecated stub
DefaultSettings.php has been replaced by MainConfigSchema.
Loading DefaultSettings.php is deprecated.

Code that needs to have access to configuration defaults should use the
ConfigSchema service object.

Bug: T300129
Change-Id: I7b2c0ca95a78990be1cdb9dd9ace92f6dcf1af15
2022-05-17 16:50:56 +02:00

29 lines
742 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 the ConfigSchema service object.
*
* @file
* @deprecated since 1.39
*/
use MediaWiki\MainConfigSchema;
if ( function_exists( 'wfDeprecatedMsg' ) ) {
wfDeprecatedMsg(
'DefaultSettings.php is deprecated and will be removed. '
. 'Use the ConfigSchema service object instead.',
'1.39'
);
}
// Extract the defaults into the current scope
foreach ( MainConfigSchema::listDefaultValues( 'wg' ) as $defaultSettingsVar => $defaultSettingsValue ) {
$$defaultSettingsVar = $defaultSettingsValue;
}
unset( $defaultSettingsVar );
unset( $defaultSettingsValue );