ApiDiscussionToolsEdit: Pass useskin & mobileformat to ApiVisualEditorEdit

From there they are passed on ApiParse.

Change-Id: I8411379694961868c2540c42739fb4f5d7b61972
This commit is contained in:
Ed Sanders 2022-02-18 16:40:38 +00:00
parent 1df44c5102
commit d1e56c7dc5

View file

@ -103,6 +103,9 @@ class ApiDiscussionToolsEdit extends ApiBase {
'section' => 'new', 'section' => 'new',
'sectiontitle' => $params['sectiontitle'], 'sectiontitle' => $params['sectiontitle'],
'starttimestamp' => wfTimestampNow(), 'starttimestamp' => wfTimestampNow(),
'useskin' => $params['useskin'],
// Param is added by hook in MobileFrontend
'mobileformat' => $params['mobileformat'],
'watchlist' => $params['watchlist'], 'watchlist' => $params['watchlist'],
'captchaid' => $params['captchaid'], 'captchaid' => $params['captchaid'],
'captchaword' => $params['captchaword'] 'captchaword' => $params['captchaword']
@ -246,6 +249,7 @@ class ApiDiscussionToolsEdit extends ApiBase {
'baserevid' => $docRevId, 'baserevid' => $docRevId,
'starttimestamp' => wfTimestampNow(), 'starttimestamp' => wfTimestampNow(),
'etag' => $headers['etag'], 'etag' => $headers['etag'],
'useskin' => $params['useskin'],
'watchlist' => $params['watchlist'], 'watchlist' => $params['watchlist'],
'captchaid' => $params['captchaid'], 'captchaid' => $params['captchaid'],
'captchaword' => $params['captchaword'] 'captchaword' => $params['captchaword']
@ -343,6 +347,12 @@ class ApiDiscussionToolsEdit extends ApiBase {
'sectiontitle' => [ 'sectiontitle' => [
ParamValidator::PARAM_TYPE => 'string', ParamValidator::PARAM_TYPE => 'string',
], ],
'useskin' => [
ApiBase::PARAM_TYPE => array_keys(
MediaWikiServices::getInstance()->getSkinFactory()->getInstalledSkins()
),
ApiBase::PARAM_HELP_MSG => 'apihelp-parse-param-useskin',
],
'watchlist' => [ 'watchlist' => [
ApiBase::PARAM_HELP_MSG => 'apihelp-edit-param-watchlist', ApiBase::PARAM_HELP_MSG => 'apihelp-edit-param-watchlist',
], ],