X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryUserInfo.php;h=036515d6f5fd7ebef674b0890cb97b0a23c3b891;hb=d19826aa35b206847a568a4b2c1c9ffaa615fca5;hp=04b0facd57a6564ccd9ebfe580262d06676c2011;hpb=0a2297c406a1bcf24a29f59a9596661e097ce665;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryUserInfo.php b/includes/api/ApiQueryUserInfo.php index 04b0facd57..036515d6f5 100644 --- a/includes/api/ApiQueryUserInfo.php +++ b/includes/api/ApiQueryUserInfo.php @@ -182,17 +182,6 @@ class ApiQueryUserInfo extends ApiQueryBase { $vals['options'][ApiResult::META_BC_BOOLS] = array_keys( $vals['options'] ); } - if ( isset( $this->prop['preferencestoken'] ) ) { - $p = $this->getModulePrefix(); - $this->addDeprecation( - [ - 'apiwarn-deprecation-withreplacement', - "{$p}prop=preferencestoken", - 'action=query&meta=tokens', - ], - "meta=userinfo&{$p}prop=preferencestoken" - ); - } if ( isset( $this->prop['preferencestoken'] ) && !$this->lacksSameOriginSecurity() && $user->isAllowed( 'editmyoptions' ) @@ -320,7 +309,6 @@ class ApiQueryUserInfo extends ApiQueryBase { 'rights', 'changeablegroups', 'options', - 'preferencestoken', 'editcount', 'ratelimits', 'email', @@ -329,6 +317,7 @@ class ApiQueryUserInfo extends ApiQueryBase { 'registrationdate', 'unreadcount', 'centralids', + 'preferencestoken', ], ApiBase::PARAM_HELP_MSG_PER_VALUE => [ 'unreadcount' => [ @@ -337,6 +326,13 @@ class ApiQueryUserInfo extends ApiQueryBase { self::WL_UNREAD_LIMIT . '+', ], ], + ApiBase::PARAM_DEPRECATED_VALUES => [ + 'preferencestoken' => [ + 'apiwarn-deprecation-withreplacement', + $this->getModulePrefix() . "prop=preferencestoken", + 'action=query&meta=tokens', + ] + ], ], 'attachedwiki' => null, ]; @@ -352,6 +348,6 @@ class ApiQueryUserInfo extends ApiQueryBase { } public function getHelpUrls() { - return 'https://www.mediawiki.org/wiki/API:Userinfo'; + return 'https://www.mediawiki.org/wiki/Special:MyLanguage/API:Userinfo'; } }