if ( $wgLocalStylePath === false ) {
$wgLocalStylePath = "$wgScriptPath/skins";
}
-if ( $wgStyleDirectory === false ) {
- $wgStyleDirectory = "$IP/skins";
-}
if ( $wgExtensionAssetsPath === false ) {
$wgExtensionAssetsPath = "$wgScriptPath/extensions";
}
$wgGitInfoCacheDirectory = "{$wgCacheDirectory}/gitinfo";
}
+if ( $wgEnableParserCache === false ) {
+ $wgParserCacheType = CACHE_NONE;
+}
+
// Fix path to icon images after they were moved in 1.24
if ( $wgRightsIcon ) {
$wgRightsIcon = str_replace(
$wgMetaNamespace = str_replace( ' ', '_', $wgSitename );
}
-// Default value is either the suhosin limit or -1 for unlimited
+// Default value is 2000 or the suhosin limit if it is between 1 and 2000
if ( $wgResourceLoaderMaxQueryLength === false ) {
- $maxValueLength = ini_get( 'suhosin.get.max_value_length' );
- $wgResourceLoaderMaxQueryLength = $maxValueLength > 0 ? $maxValueLength : -1;
+ $suhosinMaxValueLength = (int) ini_get( 'suhosin.get.max_value_length' );
+ if ( $suhosinMaxValueLength > 0 && $suhosinMaxValueLength < 2000 ) {
+ $wgResourceLoaderMaxQueryLength = $suhosinMaxValueLength;
+ } else {
+ $wgResourceLoaderMaxQueryLength = 2000;
+ }
+ unset($suhosinMaxValueLength);
}
/**
$wgFileExtensions = array_values( array_diff ( $wgFileExtensions, $wgFileBlacklist ) );
if ( $wgInvalidateCacheOnLocalSettingsChange ) {
- // @codingStandardsIgnoreStart Generic.PHP.NoSilencedErrors.Discouraged - No GlobalFunction here yet.
- $wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( "$IP/LocalSettings.php" ) ) );
- // @codingStandardsIgnoreEnd
+ MediaWiki\suppressWarnings();
+ $wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', filemtime( "$IP/LocalSettings.php" ) ) );
+ MediaWiki\restoreWarnings();
}
if ( $wgNewUserLog ) {
$wgDebugLogFile = '';
}
+// Backwards compatibility with old password limits
+if ( $wgMinimalPasswordLength !== false ) {
+ $wgPasswordPolicy['policies']['default']['MinimalPasswordLength'] = $wgMinimalPasswordLength;
+}
+
+if ( $wgMaximalPasswordLength !== false ) {
+ $wgPasswordPolicy['policies']['default']['MaximalPasswordLength'] = $wgMaximalPasswordLength;
+}
+
Profiler::instance()->scopedProfileOut( $ps_default );
// Disable MWDebug for command line mode, this prevents MWDebug from eating up
$ps_default2 = Profiler::instance()->scopedProfileIn( $fname . '-defaults2' );
+if ( $wgScriptExtension !== '.php' || defined( 'MW_ENTRY_PHP5' ) ) {
+ wfWarn( 'Script extensions other than ".php" are deprecated.' );
+}
+
if ( $wgCanonicalServer === false ) {
$wgCanonicalServer = wfExpandUrl( $wgServer, PROTO_HTTP );
}
// Now that GlobalFunctions is loaded, set defaults that depend on it.
if ( $wgTmpDirectory === false ) {
- $ps_tmpdir = Profiler::instance()->scopedProfileIn( $fname . '-tempDir' );
$wgTmpDirectory = wfTempDir();
- Profiler::instance()->scopedProfileOut( $ps_tmpdir );
}
// We don't use counters anymore. Left here for extensions still
// expecting this to exist. Should be removed sometime 1.26 or later.
$wgDisableCounters = true;
+if ( $wgMainWANCache === false ) {
+ // Setup a WAN cache from $wgMainCacheType with no relayer.
+ // Sites using multiple datacenters can configure a relayer.
+ $wgMainWANCache = 'mediawiki-main-default';
+ $wgWANObjectCaches[$wgMainWANCache] = array(
+ 'class' => 'WANObjectCache',
+ 'cacheId' => $wgMainCacheType,
+ 'pool' => 'mediawiki-main-default',
+ 'relayerConfig' => array( 'class' => 'EventRelayerNull' )
+ );
+}
+
Profiler::instance()->scopedProfileOut( $ps_default2 );
$ps_misc = Profiler::instance()->scopedProfileIn( $fname . '-misc1' );
* explicitly set. Inspired by phpMyAdmin's treatment of the problem.
*/
if ( is_null( $wgLocaltimezone ) ) {
- wfSuppressWarnings();
+ MediaWiki\suppressWarnings();
$wgLocaltimezone = date_default_timezone_get();
- wfRestoreWarnings();
+ MediaWiki\restoreWarnings();
}
date_default_timezone_set( $wgLocaltimezone );
$wgLocalTZoffset = date( 'Z' ) / 60;
}
+if ( !$wgDBerrorLogTZ ) {
+ $wgDBerrorLogTZ = $wgLocaltimezone;
+}
+
// Useful debug output
if ( $wgCommandLineMode ) {
$wgRequest = new FauxRequest( array() );
$wgMemc = wfGetMainCache();
$messageMemc = wfGetMessageCacheStorage();
$parserMemc = wfGetParserCacheStorage();
-$wgLangConvMemc = wfGetLangConverterCacheStorage();
wfDebugLog( 'caches', 'main: ' . get_class( $wgMemc ) .
', message: ' . get_class( $messageMemc ) .