From 59f1ee2682c7825ff81cee108712de47a31d500f Mon Sep 17 00:00:00 2001 From: Alexander Vorwerk Date: Sun, 18 Jul 2021 19:47:20 +0200 Subject: [PATCH] Avoid using User::getBoolOption() User::getBoolOption() is deprecated and should be replaced with UserOptionsLookup::getBoolOption() Bug: T277600 Change-Id: I5f002b68e980a0931367d037db9a7f7ec051ca43 --- includes/TimelessTemplate.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/TimelessTemplate.php b/includes/TimelessTemplate.php index fa69d52..bf71842 100644 --- a/includes/TimelessTemplate.php +++ b/includes/TimelessTemplate.php @@ -1012,7 +1012,10 @@ class TimelessTemplate extends BaseTemplate { if ( isset( $allCats['hidden'] ) ) { $hiddenCatClass = [ 'mw-hidden-catlinks' ]; - if ( $skin->getUser()->getBoolOption( 'showhiddencats' ) ) { + if ( MediaWikiServices::getInstance() + ->getUserOptionsLookup() + ->getBoolOption( $skin->getUser(), 'showhiddencats' ) + ) { $hiddenCatClass[] = 'mw-hidden-cats-user-shown'; } elseif ( $skin->getTitle()->getNamespace() == NS_CATEGORY ) { $hiddenCatClass[] = 'mw-hidden-cats-ns-shown';