From d9022f63880ce039446fba8364f68e656b7bf4cb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 3 May 2012 13:01:35 +0200 Subject: Update to MediaWiki 1.19.0 --- includes/api/ApiEmailUser.php | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'includes/api/ApiEmailUser.php') diff --git a/includes/api/ApiEmailUser.php b/includes/api/ApiEmailUser.php index 46e8d523..d9eed60c 100644 --- a/includes/api/ApiEmailUser.php +++ b/includes/api/ApiEmailUser.php @@ -24,11 +24,6 @@ * @file */ -if ( !defined( 'MEDIAWIKI' ) ) { - // Eclipse helper - will be ignored in production - require_once( "ApiBase.php" ); -} - /** * API Module to facilitate sending of emails to users * @ingroup API @@ -40,8 +35,6 @@ class ApiEmailUser extends ApiBase { } public function execute() { - global $wgUser; - $params = $this->extractRequestParams(); // Validate target @@ -51,7 +44,7 @@ class ApiEmailUser extends ApiBase { } // Check permissions and errors - $error = SpecialEmailUser::getPermissionsError( $wgUser, $params['token'] ); + $error = SpecialEmailUser::getPermissionsError( $this->getUser(), $params['token'] ); if ( $error ) { $this->dieUsageMsg( array( $error ) ); } @@ -138,9 +131,9 @@ class ApiEmailUser extends ApiBase { return ''; } - protected function getExamples() { + public function getExamples() { return array( - 'api.php?action=emailuser&target=WikiSysop&text=Content' + 'api.php?action=emailuser&target=WikiSysop&text=Content' => 'Send an email to the User "WikiSysop" with the text "Content"', ); } -- cgit v1.2.3-54-g00ecf