Addshore has submitted this change and it was merged. Change subject: SpecialResetTokens: Use Config instead of globals ......................................................................
SpecialResetTokens: Use Config instead of globals Change-Id: Iab521a681751e70c369ebf90c8ef4dab4a5d9d4a --- M includes/specials/SpecialResetTokens.php 1 file changed, 3 insertions(+), 4 deletions(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/specials/SpecialResetTokens.php b/includes/specials/SpecialResetTokens.php index 864485c..bc1326b 100644 --- a/includes/specials/SpecialResetTokens.php +++ b/includes/specials/SpecialResetTokens.php @@ -40,16 +40,15 @@ * @return array */ protected function getTokensList() { - global $wgHiddenPrefs; - if ( !isset( $this->tokensList ) ) { $tokens = array( array( 'preference' => 'watchlisttoken', 'label-message' => 'resettokens-watchlist-token' ), ); wfRunHooks( 'SpecialResetTokensTokens', array( &$tokens ) ); - $tokens = array_filter( $tokens, function ( $tok ) use ( $wgHiddenPrefs ) { - return !in_array( $tok['preference'], $wgHiddenPrefs ); + $hiddenPrefs = $this->getConfig()->get( 'HiddenPrefs' ); + $tokens = array_filter( $tokens, function ( $tok ) use ( $hiddenPrefs ) { + return !in_array( $tok['preference'], $hiddenPrefs ); } ); $this->tokensList = $tokens; -- To view, visit https://gerrit.wikimedia.org/r/151566 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iab521a681751e70c369ebf90c8ef4dab4a5d9d4a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com> Gerrit-Reviewer: Addshore <addshorew...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits