From 90c95fc7f290fac1c90e9ce8608e414dec4d7e52 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Thu, 20 Apr 2017 17:25:21 -0700 Subject: [PATCH] ApiParse: Add Skin::getDefaultModules() in useskin mode Bug: T130632 Change-Id: Idc41934eb89ec8f928bbea3b2135c3f246fe3925 --- includes/api/ApiParse.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php index b36127d7d9..d09978eadf 100644 --- a/includes/api/ApiParse.php +++ b/includes/api/ApiParse.php @@ -312,6 +312,13 @@ class ApiParse extends ApiBase { $outputPage = new OutputPage( $context ); $outputPage->addParserOutputMetadata( $p_result ); $context->setOutput( $outputPage ); + + if ( $skin ) { + // Based on OutputPage::output() + foreach ( $skin->getDefaultModules() as $group ) { + $outputPage->addModules( $group ); + } + } } if ( !is_null( $oldid ) ) { -- 2.20.1