X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSetup.php;h=e22184fc8867444b470e23f090bac10058727e8b;hb=2aac43987146c324479d45d677b0a7cb84947fb3;hp=ce091f176b81b05c13b220a862ab865f35415e23;hpb=21b3b0a1ba48bf3d32beef14d9e5e8ec0bc54bb0;p=lhc%2Fweb%2Fwiklou.git
diff --git a/includes/Setup.php b/includes/Setup.php
index ce091f176b..e22184fc88 100644
--- a/includes/Setup.php
+++ b/includes/Setup.php
@@ -421,11 +421,9 @@ if ( is_array( $wgExtraNamespaces ) ) {
// To determine the user language, use $wgLang->getCode()
$wgContLanguageCode = $wgLanguageCode;
-// Easy to forget to falsify $wgShowIPinHeader for static caches.
-// If file cache or squid cache is on, just disable this (DWIMD).
-// Do the same for $wgDebugToolbar.
+// Easy to forget to falsify $wgDebugToolbar for static caches.
+// If file cache or CDN cache is on, just disable this (DWIMD).
if ( $wgUseFileCache || $wgUseSquid ) {
- $wgShowIPinHeader = false;
$wgDebugToolbar = false;
}
@@ -474,11 +472,6 @@ if ( $wgCookieSecure === 'detect' ) {
$wgCookieSecure = ( WebRequest::detectProtocol() === 'https' );
}
-// Back compatibility for $wgRateLimitLog deprecated with 1.23
-if ( $wgRateLimitLog && !array_key_exists( 'ratelimit', $wgDebugLogGroups ) ) {
- $wgDebugLogGroups['ratelimit'] = $wgRateLimitLog;
-}
-
if ( $wgProfileOnly ) {
$wgDebugLogGroups['profileoutput'] = $wgDebugLogFile;
$wgDebugLogFile = '';
@@ -516,6 +509,21 @@ MWExceptionHandler::installHandler();
require_once "$IP/includes/compat/normal/UtfNormalUtil.php";
+
+$ps_validation = Profiler::instance()->scopedProfileIn( $fname . '-validation' );
+
+// T48998: Bail out early if $wgArticlePath is non-absolute
+if ( !preg_match( '/^(https?:\/\/|\/)/', $wgArticlePath ) ) {
+ throw new FatalError(
+ 'If you use a relative URL for $wgArticlePath, it must start ' .
+ 'with a slash (/
).
See ' .
+ '' .
+ 'https://www.mediawiki.org/wiki/Manual:$wgArticlePath.'
+ );
+}
+
+Profiler::instance()->scopedProfileOut( $ps_validation );
+
$ps_default2 = Profiler::instance()->scopedProfileIn( $fname . '-defaults2' );
if ( $wgCanonicalServer === false ) {