Ricordisamoa has uploaded a new change for review. https://gerrit.wikimedia.org/r/269924
Change subject: Stop doing $that = $this in includes/specials ...................................................................... Stop doing $that = $this in includes/specials Closures support $this as of PHP 5.4 Change-Id: I452761a6189f50f93158f6de063d31c029bc2ed3 --- M includes/specials/SpecialBotPasswords.php M includes/specials/SpecialChangeContentModel.php 2 files changed, 2 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/24/269924/1 diff --git a/includes/specials/SpecialBotPasswords.php b/includes/specials/SpecialBotPasswords.php index 93c36ab..6ea8b6e 100644 --- a/includes/specials/SpecialBotPasswords.php +++ b/includes/specials/SpecialBotPasswords.php @@ -84,7 +84,6 @@ } protected function getFormFields() { - $that = $this; $user = $this->getUser(); $request = $this->getRequest(); diff --git a/includes/specials/SpecialChangeContentModel.php b/includes/specials/SpecialChangeContentModel.php index 1f32e3f..55d54a5 100644 --- a/includes/specials/SpecialChangeContentModel.php +++ b/includes/specials/SpecialChangeContentModel.php @@ -68,7 +68,6 @@ } protected function getFormFields() { - $that = $this; $fields = array( 'pagetitle' => array( 'type' => 'title', @@ -91,10 +90,10 @@ 'reason' => array( '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; -- To view, visit https://gerrit.wikimedia.org/r/269924 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I452761a6189f50f93158f6de063d31c029bc2ed3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Ricordisamoa <ricordisa...@openmailbox.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits