* @file
*/
use MediaWiki\MediaWikiServices;
+use Wikimedia\Rdbms\LBFactory;
+use Wikimedia\Rdbms\ChronologyProtector;
/**
* This file is not a valid entry point, perform no further processing unless
}
unset( $repo ); // no global pollution; destroy reference
-// Convert this deprecated setting to modern system
-if ( $wgExperimentalHtmlIds ) {
- wfDeprecated( '$wgExperimentalHtmlIds', '1.30' );
- $wgFragmentMode = [ 'html5-legacy', 'html5' ];
-}
-
$rcMaxAgeDays = $wgRCMaxAge / ( 3600 * 24 );
if ( $wgRCFilterByAge ) {
// Trim down $wgRCLinkDays so that it only lists links which are valid
'IPAddress' => $wgRequest->getIP(),
'UserAgent' => $wgRequest->getHeader( 'User-Agent' ),
'ChronologyProtection' => $wgRequest->getHeader( 'ChronologyProtection' ),
- // The cpPosIndex cookie has no prefix and is set by MediaWiki::preOutputCommit()
- 'ChronologyPositionIndex' =>
- $wgRequest->getInt( 'cpPosIndex', (int)$wgRequest->getCookie( 'cpPosIndex', '' ) )
+ 'ChronologyPositionIndex' => $wgRequest->getInt(
+ 'cpPosIndex',
+ LBFactory::getCPIndexFromCookieValue(
+ // The cookie has no prefix and is set by MediaWiki::preOutputCommit()
+ $wgRequest->getCookie( 'cpPosIndex', '' ),
+ // Mitigate broken client-side cookie expiration handling (T190082)
+ time() - ChronologyProtector::POSITION_COOKIE_TTL
+ )
+ )
] );
// Make sure that object caching does not undermine the ChronologyProtector improvements
if ( $wgRequest->getCookie( 'UseDC', '' ) === 'master' ) {