X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiOptions.php;h=b01dc3e2397e60a17f6fbf35a39454b1cdda5554;hb=056cad90bf143334ecef23fadad346bba03c7e51;hp=86d051a6837a3a5c640619627439d322a7c85248;hpb=1e654405af3a9f41cd9ccf6803a610b559dff92c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiOptions.php b/includes/api/ApiOptions.php index 86d051a683..b01dc3e239 100644 --- a/includes/api/ApiOptions.php +++ b/includes/api/ApiOptions.php @@ -135,10 +135,6 @@ class ApiOptions extends ApiBase { $optionKinds[] = 'all'; return array( - 'token' => array( - ApiBase::PARAM_TYPE => 'string', - ApiBase::PARAM_REQUIRED => true - ), 'reset' => false, 'resetkinds' => array( ApiBase::PARAM_TYPE => $optionKinds, @@ -157,21 +153,8 @@ 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' => array( 'List of changes, formatted name=value (e.g. skin=vector), ' . @@ -194,19 +177,8 @@ class ApiOptions extends ApiBase { ); } - 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; - } - - public function getTokenSalt() { - return ''; + return 'csrf'; } public function getHelpUrls() {