Merge "ApiParse: Add Skin::getDefaultModules() in useskin mode"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 23 May 2017 18:42:40 +0000 (18:42 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 23 May 2017 18:42:40 +0000 (18:42 +0000)
includes/api/ApiParse.php

index b36127d..d09978e 100644 (file)
@@ -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 ) ) {