api: Replace numerous more deprecated constants

Change-Id: I498a315b8b4b56d5e2f939e797adbe0487cd7d07
This commit is contained in:
Reedy 2022-06-06 02:24:41 +01:00
parent 8bc27513e3
commit f45fefec0e
36 changed files with 82 additions and 72 deletions

View file

@ -1786,9 +1786,9 @@ abstract class ApiBase extends ContextSource {
if ( $this->needsToken() ) {
$params['token'] = [
self::PARAM_TYPE => 'string',
self::PARAM_REQUIRED => true,
self::PARAM_SENSITIVE => true,
ParamValidator::PARAM_TYPE => 'string',
ParamValidator::PARAM_REQUIRED => true,
ParamValidator::PARAM_SENSITIVE => true,
self::PARAM_HELP_MSG => [
'api-help-param-token',
$this->needsToken(),
@ -1833,11 +1833,11 @@ abstract class ApiBase extends ContextSource {
}
$msgs[$param] = [ $msg ];
if ( isset( $settings[self::PARAM_TYPE] ) &&
$settings[self::PARAM_TYPE] === 'submodule'
if ( isset( $settings[ParamValidator::PARAM_TYPE] ) &&
$settings[ParamValidator::PARAM_TYPE] === 'submodule'
) {
if ( isset( $settings[self::PARAM_SUBMODULE_MAP] ) ) {
$map = $settings[self::PARAM_SUBMODULE_MAP];
if ( isset( $settings[SubmoduleDef::PARAM_SUBMODULE_MAP] ) ) {
$map = $settings[SubmoduleDef::PARAM_SUBMODULE_MAP];
} else {
$prefix = $this->isMain() ? '' : ( $this->getModulePath() . '+' );
$map = [];
@ -1889,16 +1889,16 @@ abstract class ApiBase extends ContextSource {
self::dieDebug( __METHOD__,
'ApiBase::PARAM_HELP_MSG_PER_VALUE is not valid' );
}
if ( !is_array( $settings[self::PARAM_TYPE] ) ) {
if ( !is_array( $settings[ParamValidator::PARAM_TYPE] ) ) {
self::dieDebug( __METHOD__,
'ApiBase::PARAM_HELP_MSG_PER_VALUE may only be used when ' .
'ParamValidator::PARAM_TYPE is an array' );
}
$valueMsgs = $settings[self::PARAM_HELP_MSG_PER_VALUE];
$deprecatedValues = $settings[self::PARAM_DEPRECATED_VALUES] ?? [];
$deprecatedValues = $settings[EnumDef::PARAM_DEPRECATED_VALUES] ?? [];
foreach ( $settings[self::PARAM_TYPE] as $value ) {
foreach ( $settings[ParamValidator::PARAM_TYPE] as $value ) {
if ( isset( $valueMsgs[$value] ) ) {
$msg = $valueMsgs[$value];
} else {

View file

@ -256,7 +256,7 @@ class ApiBlock extends ApiBase {
],
'userid' => [
ParamValidator::PARAM_TYPE => 'integer',
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
'expiry' => 'never',
'reason' => '',

View file

@ -72,7 +72,7 @@ class ApiCheckToken extends ApiBase {
'token' => [
ParamValidator::PARAM_TYPE => 'string',
ParamValidator::PARAM_REQUIRED => true,
ApiBase::PARAM_SENSITIVE => true,
ParamValidator::PARAM_SENSITIVE => true,
],
'maxtokenage' => [
ParamValidator::PARAM_TYPE => 'integer',

View file

@ -719,19 +719,19 @@ class ApiComparePages extends ApiBase {
'text' => [
ParamValidator::PARAM_TYPE => 'text',
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
'contentformat' => [
ParamValidator::PARAM_TYPE => $this->contentHandlerFactory->getAllContentFormats(),
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
'contentmodel' => [
ParamValidator::PARAM_TYPE => $this->contentHandlerFactory->getContentModels(),
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
'section' => [
ParamValidator::PARAM_DEFAULT => null,
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
];
@ -776,7 +776,7 @@ class ApiComparePages extends ApiBase {
$ret['slots'] = [
ParamValidator::PARAM_TYPE => $slotRoles,
ParamValidator::PARAM_ISMULTI => true,
ApiBase::PARAM_ALL => true,
ParamValidator::PARAM_ALL => true,
];
return $ret;

View file

@ -286,7 +286,7 @@ class ApiDelete extends ApiBase {
'deletetalk' => false,
'watch' => [
ParamValidator::PARAM_DEFAULT => false,
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
];
@ -297,7 +297,7 @@ class ApiDelete extends ApiBase {
return $params + [
'unwatch' => [
ParamValidator::PARAM_DEFAULT => false,
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
'oldimage' => null,
];

View file

@ -697,11 +697,11 @@ class ApiEditPage extends ApiBase {
'nocreate' => false,
'watch' => [
ParamValidator::PARAM_DEFAULT => false,
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
'unwatch' => [
ParamValidator::PARAM_DEFAULT => false,
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
];

View file

@ -236,7 +236,7 @@ class ApiExpandTemplates extends ApiBase {
'showstrategykeys' => false,
'generatexml' => [
ParamValidator::PARAM_TYPE => 'boolean',
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
];
}

View file

@ -164,7 +164,7 @@ abstract class ApiFormatBase extends ApiBase {
return $paramSettings;
}
return $paramSettings[self::PARAM_DFLT] ?? null;
return $paramSettings[ParamValidator::PARAM_DEFAULT] ?? null;
}
/**

View file

@ -502,7 +502,7 @@ class ApiHelp extends ApiBase {
}
// Add "deprecated" flag
if ( !empty( $settings[ApiBase::PARAM_DEPRECATED] ) ) {
if ( !empty( $settings[ParamValidator::PARAM_DEPRECATED] ) ) {
$help['parameters'] .= Html::openElement( 'dd',
[ 'class' => 'info' ] );
$help['parameters'] .= self::wrap(

View file

@ -284,7 +284,7 @@ class ApiLogin extends ApiBase {
'token' => [
ParamValidator::PARAM_TYPE => 'string',
ParamValidator::PARAM_REQUIRED => false, // for BC
ApiBase::PARAM_SENSITIVE => true,
ParamValidator::PARAM_SENSITIVE => true,
ApiBase::PARAM_HELP_MSG => [ 'api-help-param-token', 'login' ],
],
];

View file

@ -303,7 +303,7 @@ class ApiOpenSearch extends ApiBase {
'suggest' => [
ParamValidator::PARAM_DEFAULT => false,
// Deprecated since 1.35
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
'redirects' => [
ParamValidator::PARAM_TYPE => [ 'return', 'resolve' ],

View file

@ -20,6 +20,7 @@
* @file
*/
use MediaWiki\Api\Validator\SubmoduleDef;
use MediaWiki\Cache\LinkBatchFactory;
use MediaWiki\Linker\LinkTarget;
use MediaWiki\MainConfigNames;
@ -1646,7 +1647,7 @@ class ApiPageSet extends ApiBase {
'generator' => [
ParamValidator::PARAM_TYPE => null,
ApiBase::PARAM_HELP_MSG => 'api-pageset-param-generator',
ApiBase::PARAM_SUBMODULE_PARAM_PREFIX => 'g',
SubmoduleDef::PARAM_SUBMODULE_PARAM_PREFIX => 'g',
],
'redirects' => [
ParamValidator::PARAM_DEFAULT => false,
@ -1667,7 +1668,7 @@ class ApiPageSet extends ApiBase {
unset( $result['generator'] );
} elseif ( $flags & ApiBase::GET_VALUES_FOR_HELP ) {
$result['generator'][ParamValidator::PARAM_TYPE] = 'submodule';
$result['generator'][ApiBase::PARAM_SUBMODULE_MAP] = $this->getGenerators();
$result['generator'][SubmoduleDef::PARAM_SUBMODULE_MAP] = $this->getGenerators();
}
return $result;

View file

@ -433,18 +433,18 @@ class ApiParamInfo extends ApiBase {
],
'querymodules' => [
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
ParamValidator::PARAM_ISMULTI => true,
ParamValidator::PARAM_TYPE => $querymodules,
],
'mainmodule' => [
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
'pagesetmodule' => [
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
'formatmodules' => [
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
ParamValidator::PARAM_ISMULTI => true,
ParamValidator::PARAM_TYPE => $formatmodules,
]

View file

@ -32,6 +32,7 @@ use MediaWiki\Revision\RevisionLookup;
use MediaWiki\Revision\RevisionRecord;
use MediaWiki\Revision\SlotRecord;
use Wikimedia\ParamValidator\ParamValidator;
use Wikimedia\ParamValidator\TypeDef\EnumDef;
/**
* @ingroup API
@ -1057,7 +1058,7 @@ class ApiParse extends ApiBase {
ApiBase::PARAM_HELP_MSG_PER_VALUE => [
'parsetree' => [ 'apihelp-parse-paramvalue-prop-parsetree', CONTENT_MODEL_WIKITEXT ],
],
ApiBase::PARAM_DEPRECATED_VALUES => [
EnumDef::PARAM_DEPRECATED_VALUES => [
'headitems' => 'apiwarn-deprecation-parse-headitems',
],
],
@ -1066,7 +1067,7 @@ class ApiParse extends ApiBase {
'onlypst' => false,
'effectivelanglinks' => [
ParamValidator::PARAM_DEFAULT => false,
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
'section' => null,
'sectiontitle' => [
@ -1074,7 +1075,7 @@ class ApiParse extends ApiBase {
],
'disablepp' => [
ParamValidator::PARAM_DEFAULT => false,
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
'disablelimitreport' => false,
'disableeditsection' => false,
@ -1085,7 +1086,7 @@ class ApiParse extends ApiBase {
ApiBase::PARAM_HELP_MSG => [
'apihelp-parse-param-generatexml', CONTENT_MODEL_WIKITEXT
],
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
'preview' => false,
'sectionpreview' => false,

View file

@ -205,7 +205,7 @@ class ApiProtect extends ApiBase {
'cascade' => false,
'watch' => [
ParamValidator::PARAM_DEFAULT => false,
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
] + $this->getWatchlistParams();
}

View file

@ -21,6 +21,7 @@
*/
use MediaWiki\Linker\LinksMigration;
use MediaWiki\ParamValidator\TypeDef\NamespaceDef;
use Wikimedia\ParamValidator\ParamValidator;
use Wikimedia\ParamValidator\TypeDef\IntegerDef;
@ -312,7 +313,7 @@ class ApiQueryAllLinks extends ApiQueryGeneratorBase {
'namespace' => [
ParamValidator::PARAM_DEFAULT => $this->dfltNamespace,
ParamValidator::PARAM_TYPE => 'namespace',
ApiBase::PARAM_EXTRA_NAMESPACES => [ NS_MEDIA, NS_SPECIAL ],
NamespaceDef::PARAM_EXTRA_NAMESPACES => [ NS_MEDIA, NS_SPECIAL ],
],
'limit' => [
ParamValidator::PARAM_DEFAULT => 10,

View file

@ -385,10 +385,10 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase {
'startsortkeyprefix' => null,
'endsortkeyprefix' => null,
'startsortkey' => [
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
'endsortkey' => [
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
];

View file

@ -183,7 +183,7 @@ class ApiQueryIWLinks extends ApiQueryBase {
],
'url' => [
ParamValidator::PARAM_DEFAULT => false,
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
];
}

View file

@ -28,6 +28,7 @@ use MediaWiki\ParamValidator\TypeDef\TitleDef;
use MediaWiki\Permissions\PermissionStatus;
use MediaWiki\Permissions\RestrictionStore;
use Wikimedia\ParamValidator\ParamValidator;
use Wikimedia\ParamValidator\TypeDef\EnumDef;
/**
* A query module to show basic page information.
@ -860,7 +861,7 @@ class ApiQueryInfo extends ApiQueryBase {
// need to be added to getCacheMode()
],
ApiBase::PARAM_HELP_MSG_PER_VALUE => [],
ApiBase::PARAM_DEPRECATED_VALUES => [
EnumDef::PARAM_DEPRECATED_VALUES => [
'readable' => true, // Since 1.32
],
],

View file

@ -198,7 +198,7 @@ class ApiQueryLangLinks extends ApiQueryBase {
],
'url' => [
ParamValidator::PARAM_DEFAULT => false,
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
];
}

View file

@ -22,6 +22,7 @@ use MediaWiki\Languages\LanguageConverterFactory;
use MediaWiki\Languages\LanguageFactory;
use MediaWiki\Languages\LanguageFallback;
use MediaWiki\Languages\LanguageNameUtils;
use Wikimedia\ParamValidator\ParamValidator;
use Wikimedia\Timestamp\ConvertibleTimestamp;
/**
@ -216,9 +217,9 @@ class ApiQueryLanguageinfo extends ApiQueryBase {
public function getAllowedParams() {
return [
'prop' => [
self::PARAM_DFLT => 'code',
self::PARAM_ISMULTI => true,
self::PARAM_TYPE => [
ParamValidator::PARAM_DEFAULT => 'code',
ParamValidator::PARAM_ISMULTI => true,
ParamValidator::PARAM_TYPE => [
'code',
'bcp47',
'dir',
@ -230,8 +231,8 @@ class ApiQueryLanguageinfo extends ApiQueryBase {
self::PARAM_HELP_MSG_PER_VALUE => [],
],
'code' => [
self::PARAM_DFLT => '*',
self::PARAM_ISMULTI => true,
ParamValidator::PARAM_DEFAULT => '*',
ParamValidator::PARAM_ISMULTI => true,
],
'continue' => [
self::PARAM_HELP_MSG => 'api-help-param-continue',

View file

@ -22,6 +22,7 @@
use MediaWiki\Cache\LinkBatchFactory;
use MediaWiki\Linker\LinksMigration;
use MediaWiki\ParamValidator\TypeDef\NamespaceDef;
use Wikimedia\ParamValidator\ParamValidator;
use Wikimedia\ParamValidator\TypeDef\IntegerDef;
@ -230,7 +231,7 @@ class ApiQueryLinks extends ApiQueryGeneratorBase {
'namespace' => [
ParamValidator::PARAM_TYPE => 'namespace',
ParamValidator::PARAM_ISMULTI => true,
ApiBase::PARAM_EXTRA_NAMESPACES => [ NS_MEDIA, NS_SPECIAL ],
NamespaceDef::PARAM_EXTRA_NAMESPACES => [ NS_MEDIA, NS_SPECIAL ],
],
'limit' => [
ParamValidator::PARAM_DEFAULT => 10,

View file

@ -23,6 +23,7 @@
use MediaWiki\CommentFormatter\CommentFormatter;
use MediaWiki\CommentFormatter\RowCommentFormatter;
use MediaWiki\MainConfigNames;
use MediaWiki\ParamValidator\TypeDef\NamespaceDef;
use MediaWiki\ParamValidator\TypeDef\UserDef;
use MediaWiki\Storage\NameTableAccessException;
use MediaWiki\Storage\NameTableStore;
@ -488,7 +489,7 @@ class ApiQueryLogEvents extends ApiQueryBase {
'title' => null,
'namespace' => [
ParamValidator::PARAM_TYPE => 'namespace',
ApiBase::PARAM_EXTRA_NAMESPACES => [ NS_MEDIA, NS_SPECIAL ],
NamespaceDef::PARAM_EXTRA_NAMESPACES => [ NS_MEDIA, NS_SPECIAL ],
],
'prefix' => [],
'tag' => null,

View file

@ -201,7 +201,7 @@ class ApiQueryRandom extends ApiQueryGeneratorBase {
ParamValidator::PARAM_DEFAULT => 'nonredirects', // for BC
],
'redirect' => [
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEFAULT => false,
],
'limit' => [

View file

@ -22,6 +22,7 @@
use MediaWiki\CommentFormatter\RowCommentFormatter;
use MediaWiki\MainConfigNames;
use MediaWiki\ParamValidator\TypeDef\NamespaceDef;
use MediaWiki\ParamValidator\TypeDef\UserDef;
use MediaWiki\Revision\RevisionRecord;
use MediaWiki\Revision\SlotRoleRegistry;
@ -704,7 +705,7 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
'namespace' => [
ParamValidator::PARAM_ISMULTI => true,
ParamValidator::PARAM_TYPE => 'namespace',
ApiBase::PARAM_EXTRA_NAMESPACES => [ NS_MEDIA, NS_SPECIAL ],
NamespaceDef::PARAM_EXTRA_NAMESPACES => [ NS_MEDIA, NS_SPECIAL ],
],
'user' => [
ParamValidator::PARAM_TYPE => 'user',

View file

@ -32,6 +32,7 @@ use MediaWiki\Revision\RevisionStore;
use MediaWiki\Revision\SlotRecord;
use MediaWiki\Revision\SlotRoleRegistry;
use Wikimedia\ParamValidator\ParamValidator;
use Wikimedia\ParamValidator\TypeDef\EnumDef;
use Wikimedia\ParamValidator\TypeDef\IntegerDef;
/**
@ -779,7 +780,7 @@ abstract class ApiQueryRevisionsBase extends ApiQueryGeneratorBase {
'parsetree' => [ 'apihelp-query+revisions+base-paramvalue-prop-parsetree',
CONTENT_MODEL_WIKITEXT ],
],
ApiBase::PARAM_DEPRECATED_VALUES => [
EnumDef::PARAM_DEPRECATED_VALUES => [
'parsetree' => true,
],
],
@ -787,7 +788,7 @@ abstract class ApiQueryRevisionsBase extends ApiQueryGeneratorBase {
ParamValidator::PARAM_TYPE => $slotRoles,
ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-slots',
ParamValidator::PARAM_ISMULTI => true,
ApiBase::PARAM_ALL => true,
ParamValidator::PARAM_ALL => true,
],
'limit' => [
ParamValidator::PARAM_TYPE => 'limit',
@ -799,38 +800,38 @@ abstract class ApiQueryRevisionsBase extends ApiQueryGeneratorBase {
'expandtemplates' => [
ParamValidator::PARAM_DEFAULT => false,
ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-expandtemplates',
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
'generatexml' => [
ParamValidator::PARAM_DEFAULT => false,
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-generatexml',
],
'parse' => [
ParamValidator::PARAM_DEFAULT => false,
ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-parse',
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
'section' => [
ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-section',
],
'diffto' => [
ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-diffto',
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
'difftotext' => [
ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-difftotext',
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
'difftotextpst' => [
ParamValidator::PARAM_DEFAULT => false,
ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-difftotextpst',
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
'contentformat' => [
ParamValidator::PARAM_TYPE => $this->contentHandlerFactory->getAllContentFormats(),
ApiBase::PARAM_HELP_MSG => 'apihelp-query+revisions+base-param-contentformat',
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
];
}

View file

@ -21,6 +21,7 @@
*/
use Wikimedia\ParamValidator\ParamValidator;
use Wikimedia\ParamValidator\TypeDef\EnumDef;
/**
* Query module to perform full text search within wiki titles and content
@ -422,7 +423,7 @@ class ApiQuerySearch extends ApiQueryGeneratorBase {
],
ParamValidator::PARAM_ISMULTI => true,
ApiBase::PARAM_HELP_MSG_PER_VALUE => [],
ApiBase::PARAM_DEPRECATED_VALUES => [
EnumDef::PARAM_DEPRECATED_VALUES => [
'score' => true,
'hasrelated' => true
],

View file

@ -135,7 +135,7 @@ class ApiQueryStashImageInfo extends ApiQueryImageInfo {
],
'sessionkey' => [
ParamValidator::PARAM_ISMULTI => true,
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
'prop' => [
ParamValidator::PARAM_ISMULTI => true,

View file

@ -121,7 +121,7 @@ class ApiQueryTokens extends ApiQueryBase {
ParamValidator::PARAM_DEFAULT => 'csrf',
ParamValidator::PARAM_ISMULTI => true,
ParamValidator::PARAM_TYPE => array_keys( self::getTokenTypeSalts() ),
ApiBase::PARAM_ALL => true,
ParamValidator::PARAM_ALL => true,
],
];
}

View file

@ -748,7 +748,7 @@ class ApiQueryUserContribs extends ApiQueryBase {
'tag' => null,
'toponly' => [
ParamValidator::PARAM_DEFAULT => false,
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
];
}

View file

@ -355,7 +355,7 @@ class ApiQueryUserInfo extends ApiQueryBase {
return [
'prop' => [
ParamValidator::PARAM_ISMULTI => true,
ApiBase::PARAM_ALL => true,
ParamValidator::PARAM_ALL => true,
ParamValidator::PARAM_TYPE => [
'blockinfo',
'hasmsg',

View file

@ -564,7 +564,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
],
'token' => [
ParamValidator::PARAM_TYPE => 'string',
ApiBase::PARAM_SENSITIVE => true,
ParamValidator::PARAM_SENSITIVE => true,
],
'continue' => [
ApiBase::PARAM_HELP_MSG => 'api-help-param-continue',

View file

@ -216,7 +216,7 @@ class ApiQueryWatchlistRaw extends ApiQueryGeneratorBase {
],
'token' => [
ParamValidator::PARAM_TYPE => 'string',
ApiBase::PARAM_SENSITIVE => true,
ParamValidator::PARAM_SENSITIVE => true,
],
'dir' => [
ParamValidator::PARAM_DEFAULT => 'ascending',

View file

@ -140,7 +140,7 @@ class ApiUnblock extends ApiBase {
],
'userid' => [
ParamValidator::PARAM_TYPE => 'integer',
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
'reason' => '',
'tags' => [

View file

@ -959,7 +959,7 @@ class ApiUpload extends ApiBase {
],
'watch' => [
ParamValidator::PARAM_DEFAULT => false,
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
];
@ -979,7 +979,7 @@ class ApiUpload extends ApiBase {
'url' => null,
'filekey' => null,
'sessionkey' => [
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
'stash' => false,

View file

@ -180,7 +180,7 @@ class ApiUserrights extends ApiBase {
],
'userid' => [
ParamValidator::PARAM_TYPE => 'integer',
ApiBase::PARAM_DEPRECATED => true,
ParamValidator::PARAM_DEPRECATED => true,
],
'add' => [
ParamValidator::PARAM_TYPE => $allGroups,