Merge "Use Html::hidden instead of Xml::element"

This commit is contained in:
Fomafix 2021-11-07 17:46:29 +00:00 committed by Gerrit Code Review
commit 05f15dc79f

View file

@ -212,40 +212,28 @@ class WikiEditorHooks {
WikimediaEventsHooks::shouldSchemaEditAttemptStepOversample( $outputPage->getContext() );
$outputPage->addHTML(
Xml::element(
'input',
[
'type' => 'hidden',
'name' => 'editingStatsId',
'id' => 'editingStatsId',
'value' => $editingStatsId
]
Html::hidden(
'editingStatsId',
$editingStatsId,
[ 'id' => 'editingStatsId' ]
)
);
if ( $shouldOversample ) {
$outputPage->addHTML(
Xml::element(
'input',
[
'type' => 'hidden',
'name' => 'editingStatsOversample',
'id' => 'editingStatsOversample',
'value' => 1
]
Html::hidden(
'editingStatsOversample',
1,
[ 'id' => 'editingStatsOversample' ]
)
);
}
$outputPage->addHTML(
Xml::element(
'input',
[
'type' => 'hidden',
'name' => 'wikieditorJavascriptSupport',
'id' => 'wikieditorJavascriptSupport',
'value' => ''
]
Html::hidden(
'wikieditorJavascriptSupport',
'',
[ 'id' => 'wikieditorJavascriptSupport' ]
)
);
}