ApiParse: Add Skin::getDefaultModules() in useskin mode
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 21 Apr 2017 00:25:21 +0000 (17:25 -0700)
committerTimo Tijhof <krinklemail@gmail.com>
Sun, 21 May 2017 17:06:43 +0000 (19:06 +0200)
Bug: T130632
Change-Id: Idc41934eb89ec8f928bbea3b2135c3f246fe3925

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 ) ) {