Avoid using User::getBoolOption()

User::getBoolOption() is deprecated and should be replaced with
UserOptionsLookup::getBoolOption()

Bug: T277600
Change-Id: I8219efc4429bad692e80fd2314b57a6c89a893b2
This commit is contained in:
Alexander Vorwerk 2021-06-06 14:14:30 +02:00
parent d46de4ea75
commit 7dd62360a6

View file

@ -172,7 +172,9 @@ class MinervaHooks {
if ( $skin instanceof SkinMinerva ) { if ( $skin instanceof SkinMinerva ) {
switch ( $name ) { switch ( $name ) {
case 'Recentchanges': case 'Recentchanges':
$isEnhancedDefaultForUser = $special->getUser()->getBoolOption( 'usenewrc' ); $isEnhancedDefaultForUser = MediaWikiServices::getInstance()
->getUserOptionsLookup()
->getBoolOption( $special->getUser(), 'usenewrc' );
$enhanced = $request->getBool( 'enhanced', $isEnhancedDefaultForUser ); $enhanced = $request->getBool( 'enhanced', $isEnhancedDefaultForUser );
if ( $enhanced ) { if ( $enhanced ) {
$out->addHTML( Html::warningBox( $out->addHTML( Html::warningBox(