From fca69503d9572b0729be3f25eb2f282b4a76f097 Mon Sep 17 00:00:00 2001 From: Stelio-Passaris Date: Sun, 2 Jan 2022 09:07:19 +0000 Subject: [PATCH] Fixes for MW 1.36+ Corrects deprecated calls so that the extension works with MediaWiki 1.36+ --- TalkRight.class.php | 2 +- extension.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/TalkRight.class.php b/TalkRight.class.php index b8f428e..2b0cb3a 100644 --- a/TalkRight.class.php +++ b/TalkRight.class.php @@ -32,7 +32,7 @@ static function alternateEdit( $editPage ) { */ static function giveEditRightsWhenViewingTalkPages ( &$parser, &$test1, &$test2 ) { - $user = $parser->getUser(); + $user = $parser->getUserIdentity(); if ( $parser->getTitle()->isTalkPage() && $user->isAllowed( 'talk' ) ) { array_push( $user->mRights, 'edit' ); } diff --git a/extension.json b/extension.json index 082b486..8eb12d7 100644 --- a/extension.json +++ b/extension.json @@ -19,7 +19,7 @@ "AlternateEdit": [ "TalkRight::alternateEdit" ], - "ParserBeforeStrip": [ + "ParserBeforeInternalParse": [ "TalkRight::giveEditRightsWhenViewingTalkPages" ] },