jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382911 )
Change subject: Remove compatibility with pre-1.27 MediaWiki ...................................................................... Remove compatibility with pre-1.27 MediaWiki Change-Id: I3f7fd7b11d5f710ae4e940bdddd7001aa6948cf3 --- M extension.json M includes/Hooks.php 2 files changed, 3 insertions(+), 42 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified Samwilson: Looks good to me, but someone else must approve diff --git a/extension.json b/extension.json index 580334d..0b1344d 100644 --- a/extension.json +++ b/extension.json @@ -9,6 +9,7 @@ "license-name": "MIT", "type": "other", "requires": { + "MediaWiki": ">= 1.27.0", "extensions": { "Echo": "*" } @@ -37,14 +38,8 @@ "EchoGetBundleRules": [ "LoginNotify\\Hooks::onEchoGetBundleRules" ], - "LoginAuthenticateAudit": [ - "LoginNotify\\Hooks::onLoginAuthenticateAudit" - ], "AuthManagerLoginAuthenticateAudit": [ "LoginNotify\\Hooks::onAuthManagerLoginAuthenticateAudit" - ], - "AddNewAccount": [ - "LoginNotify\\Hooks::onAddNewAccount" ], "LocalUserCreated": [ "LoginNotify\\Hooks::onLocalUserCreated" diff --git a/includes/Hooks.php b/includes/Hooks.php index 88fb06e..ed92467 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -10,7 +10,6 @@ use EchoAttributeManager; use EchoEvent; -use LoginForm; use MediaWiki\Auth\AuthenticationResponse; use User; @@ -97,24 +96,7 @@ } /** - * Old hook for pre 1.27 or wikis with auth manager disabled. - * - * @todo Doesn't catch CAPTCHA or throttle failures - * - * @param User $user User in question. - * @param string $pass The password (parameter not used). - * @param int $retval A LoginForm constant (e.g. LoginForm::SUCCESS). - */ - public static function onLoginAuthenticateAudit( User $user, $pass, $retval ) { - if ( $retval === LoginForm::WRONG_PASS ) { - self::doFailedLogin( $user ); - } elseif ( $retval === LoginForm::SUCCESS ) { - self::doSuccessfulLogin( $user ); - } - } - - /** - * Hook for login auditing post 1.27 + * Hook for login auditing * * @param AuthenticationResponse $ret Is login successful? * @param User|null $user User object on successful auth @@ -165,23 +147,7 @@ } /** - * Deprecated since v1.27 - * - * Set a cookie saying this is a known computer when creating an account. - * - * @todo This still sets cookies if user creates an account while logged in as someone else. - * @param User $user The user that has been created. - * @param bool $byMail Account created by email - */ - public static function onAddNewAccount( User $user, $byMail ) { - if ( !$byMail ) { - $loginNotify = new LoginNotify(); - $loginNotify->setCurrentAddressAsKnown( $user ); - } - } - - /** - * Hook for new account creation since v1.27 + * Hook handler for new account creation. * * Called immediately after a local user has been created and saved to the database * -- To view, visit https://gerrit.wikimedia.org/r/382911 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3f7fd7b11d5f710ae4e940bdddd7001aa6948cf3 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/LoginNotify Gerrit-Branch: master Gerrit-Owner: MaxSem <maxsem.w...@gmail.com> Gerrit-Reviewer: Kaldari <rkald...@wikimedia.org> Gerrit-Reviewer: Legoktm <lego...@member.fsf.org> Gerrit-Reviewer: MusikAnimal <musikani...@gmail.com> Gerrit-Reviewer: Niharika29 <nko...@wikimedia.org> Gerrit-Reviewer: Reedy <re...@wikimedia.org> Gerrit-Reviewer: Samwilson <s...@samwilson.id.au> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits