From 72e90545454c0e014318fa3c81658e035aac58c1 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 10 Jun 2009 13:00:47 +0200 Subject: applying patch to version 1.15.0 --- includes/api/ApiEmailUser.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'includes/api/ApiEmailUser.php') diff --git a/includes/api/ApiEmailUser.php b/includes/api/ApiEmailUser.php index fbdf495f..9bb504fb 100644 --- a/includes/api/ApiEmailUser.php +++ b/includes/api/ApiEmailUser.php @@ -39,14 +39,11 @@ class ApiEmailUser extends ApiBase { public function execute() { global $wgUser; - // Check whether email is enabled if ( !EmailUserForm::userEmailEnabled() ) $this->dieUsageMsg( array( 'usermaildisabled' ) ); - - $this->getMain()->requestWriteMode(); + $params = $this->extractRequestParams(); - // Check required parameters if ( !isset( $params['target'] ) ) $this->dieUsageMsg( array( 'missingparam', 'target' ) ); @@ -79,6 +76,10 @@ class ApiEmailUser extends ApiBase { public function mustBePosted() { return true; } + public function isWriteMode() { + return true; + } + public function getAllowedParams() { return array ( 'target' => null, @@ -112,7 +113,7 @@ class ApiEmailUser extends ApiBase { } public function getVersion() { - return __CLASS__ . ': $Id: ApiEmailUser.php 41269 2008-09-25 21:39:36Z catrope $'; + return __CLASS__ . ': $Id: ApiEmailUser.php 48091 2009-03-06 13:49:44Z catrope $'; } } \ No newline at end of file -- cgit v1.2.3-54-g00ecf