X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiOptions.php;h=8ac9b9afb0e5c919cba3b78c5037ab40fcf369cd;hb=0525f22b8825c617fffa98f191ab07e8113da085;hp=fb441a34f2b98a193a7e949059e8efad43b90acf;hpb=b51729f77074984d4db7ff12e6d864c358292ec3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiOptions.php b/includes/api/ApiOptions.php index fb441a34f2..8ac9b9afb0 100644 --- a/includes/api/ApiOptions.php +++ b/includes/api/ApiOptions.php @@ -157,27 +157,16 @@ class ApiOptions extends ApiBase { ); } - public function getResultProperties() { - return array( - '' => array( - '*' => array( - ApiBase::PROP_TYPE => array( - 'success' - ) - ) - ) - ); - } - public function getParamDescription() { return array( 'token' => 'An options token previously obtained through the action=tokens', 'reset' => 'Resets preferences to the site defaults', 'resetkinds' => 'List of types of options to reset when the "reset" option is set', - 'change' => 'List of changes, formatted name=value (e.g. skin=vector), ' . - 'value cannot contain pipe characters. If no value is given (not ' . + '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', + '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', @@ -186,20 +175,13 @@ class ApiOptions extends ApiBase { public function getDescription() { return array( - 'Change preferences of the current user', + '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 getPossibleErrors() { - return array_merge( parent::getPossibleErrors(), array( - array( 'code' => 'notloggedin', 'info' => 'Anonymous users cannot change preferences' ), - array( 'code' => 'nochanges', 'info' => 'No changes were requested' ), - ) ); - } - public function needsToken() { return true; }