Fix usage of ApiBase::PARAM_* deprecated constants

The ones that are replaced with ParamValidator

Bug: T275455
Change-Id: I69cfbbe5b00a4e15a0d6492541292bcddd61069a
This commit is contained in:
gerritbot 2022-04-04 01:29:23 +02:00 committed by jenkins-bot
parent 9c3fe53170
commit 14589459a1

View file

@ -1,6 +1,7 @@
<?php
use MediaWiki\MediaWikiServices;
use Wikimedia\ParamValidator\ParamValidator;
/**
* API module for serving debug console requests on the edit page
@ -144,20 +145,20 @@ class ApiScribuntoConsole extends ApiBase {
public function getAllowedParams() {
return [
'title' => [
ApiBase::PARAM_TYPE => 'string',
ParamValidator::PARAM_TYPE => 'string',
],
'content' => [
ApiBase::PARAM_TYPE => 'text'
ParamValidator::PARAM_TYPE => 'text'
],
'session' => [
ApiBase::PARAM_TYPE => 'integer',
ParamValidator::PARAM_TYPE => 'integer',
],
'question' => [
ApiBase::PARAM_TYPE => 'text',
ApiBase::PARAM_REQUIRED => true,
ParamValidator::PARAM_TYPE => 'text',
ParamValidator::PARAM_REQUIRED => true,
],
'clear' => [
ApiBase::PARAM_TYPE => 'boolean',
ParamValidator::PARAM_TYPE => 'boolean',
],
];
}