Merge "Tweaked BagOStuff::lock() retry times slightly to be faster"
[lhc/web/wiklou.git] / includes / api / ApiEmailUser.php
index d35b848..15eb475 100644 (file)
@@ -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',
                );
        }