X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FSetup.php;h=3e37c9c9c1aff518eabebcc8a1c1cc71ccbc502d;hp=d6f4b2fe4c0b28cf9ee57e240dd0f0ad83ec8fa1;hb=0535765366fc2bc72e84bacb0b14e5a2a790ee94;hpb=565558f4ef6762df13613d3ef03804b39423cf2e diff --git a/includes/Setup.php b/includes/Setup.php index d6f4b2fe4c..3e37c9c9c1 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -360,6 +360,7 @@ unset( $repo ); // no global pollution; destroy reference // Convert this deprecated setting to modern system if ( $wgExperimentalHtmlIds ) { + wfDeprecated( '$wgExperimentalHtmlIds', '1.30' ); $wgFragmentMode = [ 'html5-legacy', 'html5' ]; } @@ -370,9 +371,8 @@ if ( $wgRCFilterByAge ) { // Note that we allow 1 link higher than the max for things like 56 days but a 60 day link. sort( $wgRCLinkDays ); - // @codingStandardsIgnoreStart Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed + // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall for ( $i = 0; $i < count( $wgRCLinkDays ); $i++ ) { - // @codingStandardsIgnoreEnd if ( $wgRCLinkDays[$i] >= $rcMaxAgeDays ) { $wgRCLinkDays = array_slice( $wgRCLinkDays, 0, $i + 1, false ); break; @@ -737,19 +737,19 @@ if ( !$wgDBerrorLogTZ ) { // Initialize the request object in $wgRequest $wgRequest = RequestContext::getMain()->getRequest(); // BackCompat // Set user IP/agent information for causal consistency purposes. -// The cpPosTime cookie has no prefix and is set by MediaWiki::preOutputCommit(). -$cpPosTime = $wgRequest->getFloat( 'cpPosTime', $wgRequest->getCookie( 'cpPosTime', '' ) ); +// The cpPosIndex cookie has no prefix and is set by MediaWiki::preOutputCommit(). +$cpPosIndex = $wgRequest->getInt( 'cpPosIndex', (int)$wgRequest->getCookie( 'cpPosIndex', '' ) ); MediaWikiServices::getInstance()->getDBLoadBalancerFactory()->setRequestInfo( [ 'IPAddress' => $wgRequest->getIP(), 'UserAgent' => $wgRequest->getHeader( 'User-Agent' ), 'ChronologyProtection' => $wgRequest->getHeader( 'ChronologyProtection' ), - 'ChronologyPositionTime' => $cpPosTime + 'ChronologyPositionIndex' => $cpPosIndex ] ); // Make sure that caching does not compromise the consistency improvements -if ( $cpPosTime ) { +if ( $cpPosIndex ) { MediaWikiServices::getInstance()->getMainWANObjectCache()->useInterimHoldOffCaching( false ); } -unset( $cpPosTime ); +unset( $cpPosIndex ); // Useful debug output if ( $wgCommandLineMode ) {