Only basic ones done.
Couple of other modules done manually
'Email a user.'
);
}
+
+ public function getPossibleErrors() {
+ return array_merge( parent::getPossibleErrors(), array(
+ array( 'usermaildisabled' ),
+ array( 'missingparam', 'target' ),
+ array( 'missingparam', 'text' ),
+ array( 'missingparam', 'token' ),
+ ) );
+ }
protected function getExamples() {
return array (
);
}
-
public function getDescription() {
return 'Output data in XML format' . parent :: getDescription();
}
'This is to prevent password guessing by automated password crackers.'
);
}
+
+ public function getPossibleErrors() {
+ return array_merge( parent::getPossibleErrors(), array (
+ array( 'code' => 'NoName', 'info' => 'You didn\'t set the lgname parameter' ),
+ array( 'code' => 'Illegal', 'info' => ' You provided an illegal username' ),
+ array( 'code' => 'NotExists', 'info' => ' The username you provided doesn\'t exist' ),
+ array( 'code' => 'EmptyPass', 'info' => ' You didn\'t set the lgpassword parameter or you left it empty' ),
+ array( 'code' => 'WrongPass', 'info' => ' The password you provided is incorrect' ),
+ array( 'code' => 'WrongPluginPass', 'info' => 'Same as `WrongPass", returned when an authentication plugin rather than MediaWiki itself rejected the password' ),
+ array( 'code' => 'CreateBlocked', 'info' => 'The wiki tried to automatically create a new account for you, but your IP address has been blocked from account creation' ),
+ array( 'code' => 'Throttled', 'info' => 'You\'ve logged in too many times in a short time' ),
+ array( 'code' => 'Blocked', 'info' => 'User is blocked' ),
+ ) );
+;
+ }
protected function getExamples() {
return array(
'',
);
}
+
+ public function getPossibleErrors() {
+ return array_merge( parent::getPossibleErrors(), array(
+ array( 'readonlytext' ),
+ ) );
+ }
/**
* Returns an array of strings with credits for the API
'Purge the cache for the given titles.'
);
}
+
+ public function getPossibleErrors() {
+ return array_merge( parent::getPossibleErrors(), array(
+ array( 'cantpurge' ),
+ array( 'missingparam', 'titles' ),
+ ) );
+ }
protected function getExamples() {
return array(
return 'Return general information about the site.';
}
+ public function getPossibleErrors() {
+ return array_merge( parent::getPossibleErrors(), array(
+ array( 'code' => 'includeAllDenied', 'info' => 'Cannot view all servers info unless $wgShowHostnames is true', ),
+ ) );
+ }
+
protected function getExamples() {
return array(
'api.php?action=query&meta=siteinfo&siprop=general|namespaces|namespacealiases|statistics',
'Unblock a user.'
);
}
+
+ public function getPossibleErrors() {
+ return array_merge( parent::getPossibleErrors(), array(
+ array( 'unblock-notarget' ),
+ array( 'unblock-idanduser' ),
+ array( 'missingparam', 'token' ),
+ array( 'sessionfailure' ),
+ array( 'cantunblock' ),
+ ) );
+ }
protected function getExamples() {
return array (
'log out and then log back in). Also you must get and send an edit token before doing any upload stuff.'
);
}
+
+ public function getPossibleErrors() {
+ return array_merge( parent::getPossibleErrors(), array(
+ array( 'uploaddisabled' ),
+ array( 'missingparam', 'token' ),
+ array( 'sessionfailure' ),
+ array( 'invalid-session-key' ),
+ array( 'uploaddisabled' ),
+ array( 'badaccess-groups' ),
+ array( 'missingparam', 'filename' ),
+ array( 'mustbeloggedin', 'upload' ),
+ array( 'badaccess-groups' ),
+ array( 'badaccess-groups' ),
+ ) );
+ }
protected function getExamples() {
return array(
'Add/remove a user to/from groups',
);
}
+
+ public function getPossibleErrors() {
+ return array_merge( parent::getPossibleErrors(), array(
+ array( 'missingparam', 'user' ),
+ array( 'missingparam', 'token' ),
+ array( 'sessionfailure' ),
+ ) );
+ }
protected function getExamples() {
return array (