Amritsreekumar has uploaded a new change for review. https://gerrit.wikimedia.org/r/316063
Change subject: ChangeTags::buildTagFilterSelector needs a context ...................................................................... ChangeTags::buildTagFilterSelector needs a context ChangeTags::buildTagFilterSelector is using wfMessage which results in use of global $wgTitle. It also using a config variable as global. A IContextSource should be added as parameter to this static function, which can be used to avoid the globals Bug: T105649 Change-Id: I50ca27c75b4807f5e4391648bfd5cac9169517e9 --- M includes/changetags/ChangeTags.php 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/63/316063/1 diff --git a/includes/changetags/ChangeTags.php b/includes/changetags/ChangeTags.php index 76dd754..d220a57 100644 --- a/includes/changetags/ChangeTags.php +++ b/includes/changetags/ChangeTags.php @@ -669,7 +669,7 @@ * You need to call OutputPage::enableOOUI() yourself. * @return array an array of (label, selector) */ - public static function buildTagFilterSelector( $selected = '', $ooui = false ) { + public static function buildTagFilterSelector( $selected = '', $ooui = false, IContextSource $context = null) { global $wgUseTagFilter; if ( !$wgUseTagFilter || !count( self::listDefinedTags() ) ) { @@ -680,9 +680,11 @@ Html::rawElement( 'label', [ 'for' => 'tagfilter' ], - wfMessage( 'tag-filter' )->parse() + $context->msg( 'tag-filter' )->parse() ) ]; + if ( !$context ) { + $context = RequestContext::getMain(); if ( $ooui ) { $data[] = new OOUI\TextInputWidget( [ -- To view, visit https://gerrit.wikimedia.org/r/316063 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I50ca27c75b4807f5e4391648bfd5cac9169517e9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Amritsreekumar <amrit.sreeku...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits