From: Ricordisamoa Date: Thu, 11 Feb 2016 08:37:23 +0000 (+0100) Subject: Stop doing $that = $this in includes/specials X-Git-Tag: 1.31.0-rc.0~7908^2 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=abacff63f3ed58bf153e40ebb4007b06c7873f04;p=lhc%2Fweb%2Fwiklou.git Stop doing $that = $this in includes/specials Closures support $this as of PHP 5.4 Change-Id: I452761a6189f50f93158f6de063d31c029bc2ed3 --- 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;