X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSetup.php;h=70c935d37f5043f459d5e1cc1892b368a6075cbe;hb=848794bd574ce4427047d47c940bbed22b901aef;hp=9a911564f9bf91246440c3e99d16a58452d199a7;hpb=b2faab0991a16b3102c8167bdb3147699f3b86fb;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Setup.php b/includes/Setup.php index 9a911564f9..70c935d37f 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -74,9 +74,6 @@ if ( $wgStylePath === false ) { if ( $wgLocalStylePath === false ) { $wgLocalStylePath = "$wgScriptPath/skins"; } -if ( $wgStyleDirectory === false ) { - $wgStyleDirectory = "$IP/skins"; -} if ( $wgExtensionAssetsPath === false ) { $wgExtensionAssetsPath = "$wgScriptPath/extensions"; } @@ -108,6 +105,10 @@ if ( $wgGitInfoCacheDirectory === false && $wgCacheDirectory !== false ) { $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( @@ -433,9 +434,9 @@ if ( !$wgHtml5Version && $wgAllowRdfaAttributes ) { $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 ) { @@ -469,6 +470,15 @@ if ( $wgProfileOnly ) { $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 @@ -488,8 +498,8 @@ require_once "$IP/includes/libs/normal/UtfNormalUtil.php"; $ps_default2 = Profiler::instance()->scopedProfileIn( $fname . '-defaults2' ); -if ( defined( 'MW_ENTRY_PHP5' ) ) { - wfWarn( 'The ".php5" entry point files are deprecated. Use ".php" instead.' ); +if ( $wgScriptExtension !== '.php' || defined( 'MW_ENTRY_PHP5' ) ) { + wfWarn( 'Script extensions other than ".php" are deprecated.' ); } if ( $wgCanonicalServer === false ) { @@ -555,9 +565,9 @@ wfMemoryLimit(); * 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 );