diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:30:02 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:30:02 -0400 |
commit | 1de335ad3f395ca6861085393ba366a9e3fb4a0d (patch) | |
tree | f1fdd326034e05177596851be6a7127615d81498 /includes/api/ApiOptions.php | |
parent | 9c75fa8ff6d4d38ef552c00fef5969fb154765e8 (diff) | |
parent | f6d65e533c62f6deb21342d4901ece24497b433e (diff) |
Merge commit 'f6d65'
# Conflicts:
# skins/ArchLinux/ArchLinux.php
Diffstat (limited to 'includes/api/ApiOptions.php')
-rw-r--r-- | includes/api/ApiOptions.php | 37 |
1 files changed, 8 insertions, 29 deletions
diff --git a/includes/api/ApiOptions.php b/includes/api/ApiOptions.php index b01dc3e2..8ef06299 100644 --- a/includes/api/ApiOptions.php +++ b/includes/api/ApiOptions.php @@ -153,30 +153,6 @@ class ApiOptions extends ApiBase { ); } - public function getParamDescription() { - return array( - 'reset' => 'Resets preferences to the site defaults', - 'resetkinds' => 'List of types of options to reset when the "reset" option is set', - 'change' => array( 'List of changes, formatted name=value (e.g. skin=vector), ' . - 'value cannot contain pipe characters. If no value is given (not ', - 'even an equals sign), e.g., optionname|otheroption|..., the ' . - 'option will be reset to its default value' - ), - 'optionname' => 'A name of a option which should have an optionvalue set', - 'optionvalue' => 'A value of the option specified by the optionname, ' . - 'can contain pipe characters', - ); - } - - public function getDescription() { - return array( - 'Change preferences of the current user.', - 'Only options which are registered in core or in one of installed extensions,', - 'or as options with keys prefixed with \'userjs-\' (intended to be used by user', - 'scripts), can be set.' - ); - } - public function needsToken() { return 'csrf'; } @@ -185,12 +161,15 @@ class ApiOptions extends ApiBase { return 'https://www.mediawiki.org/wiki/API:Options'; } - public function getExamples() { + protected function getExamplesMessages() { return array( - 'api.php?action=options&reset=&token=123ABC', - 'api.php?action=options&change=skin=vector|hideminor=1&token=123ABC', - 'api.php?action=options&reset=&change=skin=monobook&optionname=nickname&' . - 'optionvalue=[[User:Beau|Beau]]%20([[User_talk:Beau|talk]])&token=123ABC', + 'action=options&reset=&token=123ABC' + => 'apihelp-options-example-reset', + 'action=options&change=skin=vector|hideminor=1&token=123ABC' + => 'apihelp-options-example-change', + 'action=options&reset=&change=skin=monobook&optionname=nickname&' . + 'optionvalue=[[User:Beau|Beau]]%20([[User_talk:Beau|talk]])&token=123ABC' + => 'apihelp-options-example-complex', ); } } |