mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 00:00:49 +00:00
Edit API: Run OutputPageBeforeHTML hook on output
The output is assumed to be the same as you would get if you fetched the page again, so this output-modifying hook needs to run. Bug: T258980 Change-Id: I015ac183a0c25dafb9b95c577edd4ef59c112d43
This commit is contained in:
parent
eb98439453
commit
a63133776a
|
@ -423,9 +423,12 @@ class ApiVisualEditorEdit extends ApiBase {
|
|||
|
||||
$context = new RequestContext;
|
||||
$context->setTitle( $title );
|
||||
$context->setRequest( new FauxRequest( [ 'action' => 'view' ] ) );
|
||||
$tempOut = new OutputPage( $context );
|
||||
$tempOut->setArticleFlag( true );
|
||||
|
||||
Hooks::run( 'OutputPageBeforeHTML', [ $tempOut, &$result['content'] ] );
|
||||
|
||||
$subpagestr = $this->getSkin()->subPageSubtitle( $tempOut );
|
||||
if ( $subpagestr !== '' ) {
|
||||
$subpagestr = '<span class="subpages">' . $subpagestr . '</span>';
|
||||
|
|
Loading…
Reference in a new issue