jenkins-bot has submitted this change and it was merged. Change subject: Get user from context instead of global ......................................................................
Get user from context instead of global DifferenceEngine extends ContextSource, so we can get the user from there instead of using a global. Change-Id: I46e7a244729f2d8259319bed2c905e2971b37bf0 --- M RevisionSlider.hooks.php 1 file changed, 1 insertion(+), 3 deletions(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/RevisionSlider.hooks.php b/RevisionSlider.hooks.php index d2b059c..189812e 100644 --- a/RevisionSlider.hooks.php +++ b/RevisionSlider.hooks.php @@ -15,15 +15,13 @@ Revision $oldRev, Revision $newRev ) { - global $wgUser; - /** * If this extension is deployed with the BetaFeatures extension then require the * current user to have it enabled as a BetaFeature. */ if ( class_exists( BetaFeatures::class ) && - !BetaFeatures::isFeatureEnabled( $wgUser, 'revisionslider' ) ) + !BetaFeatures::isFeatureEnabled( $diff->getUser(), 'revisionslider' ) ) { return true; } -- To view, visit https://gerrit.wikimedia.org/r/299024 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I46e7a244729f2d8259319bed2c905e2971b37bf0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/RevisionSlider Gerrit-Branch: master Gerrit-Owner: Aude <aude.w...@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