X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiRollback.php;h=02e62a035110e0680ee57107596c80c3b28de4e2;hb=37297d5468a2339b20e6aebffe9031cf72584270;hp=f4d3c5414d29681ca94b05f576b0257386056f97;hpb=db6b2cb3c252479ed6e9cf80100c3802528bd45f;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiRollback.php b/includes/api/ApiRollback.php index f4d3c5414d..02e62a0351 100644 --- a/includes/api/ApiRollback.php +++ b/includes/api/ApiRollback.php @@ -120,31 +120,10 @@ class ApiRollback extends ApiBase { 'nochange' ), ), - ); - } - - public function getParamDescription() { - $p = $this->getModulePrefix(); - - return array( - 'title' => "Title of the page you want to roll back. Cannot be used together with {$p}pageid", - 'pageid' => "Page ID of the page you want to roll back. Cannot be used together with {$p}title", - 'user' => 'Name of the user whose edits are to be rolled back.', 'token' => array( - /* Standard description automatically prepended */ - 'For compatibility, the token used in the web UI is also accepted.' + // Standard definition automatically inserted + ApiBase::PARAM_HELP_MSG_APPEND => array( 'api-help-param-token-webui' ), ), - 'summary' => 'Custom edit summary. If empty, default summary will be used', - 'markbot' => 'Mark the reverted edits and the revert as bot edits', - 'watchlist' => 'Unconditionally add or remove the page from your watchlist, ' . - 'use preferences or do not change watch', - ); - } - - public function getDescription() { - return array( - 'Undo the last edit to the page. If the last user who edited the page made', - 'multiple edits in a row, they will all be rolled back.' ); } @@ -211,12 +190,13 @@ class ApiRollback extends ApiBase { return $this->mTitleObj; } - public function getExamples() { + protected function getExamplesMessages() { return array( - 'api.php?action=rollback&title=Main%20Page&user=Catrope&token=123ABC', - 'api.php?action=rollback&pageid=122&user=Catrope&token=123ABC', - 'api.php?action=rollback&title=Main%20Page&user=217.121.114.116&' . - 'token=123ABC&summary=Reverting%20vandalism&markbot=1' + 'action=rollback&title=Main%20Page&user=Example&token=123ABC' => + 'apihelp-rollback-example-simple', + 'action=rollback&title=Main%20Page&user=192.0.2.5&' . + 'token=123ABC&summary=Reverting%20vandalism&markbot=1' => + 'apihelp-rollback-example-summary', ); }