mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-27 15:50:29 +00:00
Revert "Remove use of deprecated HtmlInputTransformHelper::init(..."
Revert submission 1039794-split-render-id Reason for revert: Depends-On has not been merged yet so this is causing CI issues. Reverted changes: /r/q/submissionid:1039794-split-render-id Change-Id: Ifcb43e8e3dd845c146498562b398affe2936593f
This commit is contained in:
parent
e64037f19d
commit
eb3b47be84
|
@ -87,6 +87,8 @@ class DirectParsoidClient implements ParsoidClient {
|
|||
string $etag = null,
|
||||
Bcp47Code $pageLanguage = null
|
||||
): HtmlInputTransformHelper {
|
||||
$helper = $this->helperFactory->newHtmlInputTransformHelper();
|
||||
|
||||
// Fake REST body
|
||||
$body = [
|
||||
'html' => [
|
||||
|
@ -94,24 +96,17 @@ class DirectParsoidClient implements ParsoidClient {
|
|||
]
|
||||
];
|
||||
|
||||
$metrics = MediaWikiServices::getInstance()->getParsoidSiteConfig()->metrics();
|
||||
if ( $metrics ) {
|
||||
$helper->setMetrics( $metrics );
|
||||
}
|
||||
|
||||
if ( $oldid || $etag ) {
|
||||
$body['original']['revid'] = $oldid;
|
||||
$body['original']['renderid'] = $etag;
|
||||
}
|
||||
|
||||
$helper = $this->helperFactory->newHtmlInputTransformHelper(
|
||||
/* envOptions: */ [],
|
||||
$page,
|
||||
$body,
|
||||
/* parameters: */ [],
|
||||
/* originalRevision: */ null,
|
||||
$pageLanguage
|
||||
);
|
||||
|
||||
$metrics = MediaWikiServices::getInstance()->getParsoidSiteConfig()->metrics();
|
||||
if ( $metrics ) {
|
||||
$helper->setMetrics( $metrics );
|
||||
}
|
||||
$helper->init( $page, $body, [], null, $pageLanguage );
|
||||
|
||||
return $helper;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue