X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiEmailUser.php;h=15eb475e73c8be418efbe4fcaf1f2a1f202e9aba;hb=f26e34fa2866584f7a86f559578aab7b2bb35f7a;hp=d35b848bc1c1d20ee137fdf2b10726c37b3e558e;hpb=768493b825348b42e4bf9837153a937c8033c59e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiEmailUser.php b/includes/api/ApiEmailUser.php index d35b848bc1..15eb475e73 100644 --- a/includes/api/ApiEmailUser.php +++ b/includes/api/ApiEmailUser.php @@ -40,7 +40,11 @@ class ApiEmailUser extends ApiBase { } // Check permissions and errors - $error = SpecialEmailUser::getPermissionsError( $this->getUser(), $params['token'] ); + $error = SpecialEmailUser::getPermissionsError( + $this->getUser(), + $params['token'], + $this->getConfig() + ); if ( $error ) { $this->dieUsageMsg( array( $error ) ); } @@ -98,27 +102,14 @@ class ApiEmailUser extends ApiBase { ); } - public function getParamDescription() { - return array( - 'target' => 'User to send email to', - 'subject' => 'Subject header', - 'text' => 'Mail body', - 'ccme' => 'Send a copy of this mail to me', - ); - } - - public function getDescription() { - return 'Email a user.'; - } - public function needsToken() { return 'csrf'; } - public function getExamples() { + protected function getExamplesMessages() { return array( - 'api.php?action=emailuser&target=WikiSysop&text=Content&token=123ABC' - => 'Send an email to the User "WikiSysop" with the text "Content"', + 'action=emailuser&target=WikiSysop&text=Content&token=123ABC' + => 'apihelp-emailuser-example-email', ); }