From abacff63f3ed58bf153e40ebb4007b06c7873f04 Mon Sep 17 00:00:00 2001 From: Ricordisamoa Date: Thu, 11 Feb 2016 09:37:23 +0100 Subject: [PATCH] Stop doing $that = $this in includes/specials Closures support $this as of PHP 5.4 Change-Id: I452761a6189f50f93158f6de063d31c029bc2ed3 --- includes/specials/SpecialBotPasswords.php | 1 - includes/specials/SpecialChangeContentModel.php | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/includes/specials/SpecialBotPasswords.php b/includes/specials/SpecialBotPasswords.php index 47e3316365..11357fbd0b 100644 --- a/includes/specials/SpecialBotPasswords.php +++ b/includes/specials/SpecialBotPasswords.php @@ -84,7 +84,6 @@ class SpecialBotPasswords extends FormSpecialPage { } protected function getFormFields() { - $that = $this; $user = $this->getUser(); $request = $this->getRequest(); diff --git a/includes/specials/SpecialChangeContentModel.php b/includes/specials/SpecialChangeContentModel.php index d495120e0c..bf44b42d49 100644 --- a/includes/specials/SpecialChangeContentModel.php +++ b/includes/specials/SpecialChangeContentModel.php @@ -68,7 +68,6 @@ class SpecialChangeContentModel extends FormSpecialPage { } protected function getFormFields() { - $that = $this; $fields = [ 'pagetitle' => [ 'type' => 'title', @@ -91,10 +90,10 @@ class SpecialChangeContentModel extends FormSpecialPage { 'reason' => [ 'type' => 'text', 'name' => 'reason', - 'validation-callback' => function( $reason ) use ( $that ) { + 'validation-callback' => function( $reason ) { $match = EditPage::matchSummarySpamRegex( $reason ); if ( $match ) { - return $that->msg( 'spamprotectionmatch', $match )->parse(); + return $this->msg( 'spamprotectionmatch', $match )->parse(); } return true; -- 2.20.1