Merge "ApiExpandTemplates: Start parse before creating frame"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 20 Jun 2014 00:02:58 +0000 (00:02 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 20 Jun 2014 00:02:58 +0000 (00:02 +0000)
includes/api/ApiExpandTemplates.php

index eb3f87c..82d303f 100644 (file)
@@ -89,6 +89,7 @@ class ApiExpandTemplates extends ApiBase {
                // if they didn't want any output except (probably) the parse tree,
                // then don't bother actually fully expanding it
                if ( $prop || $params['prop'] === null ) {
+                       $wgParser->startExternalParse( $title_obj, $options, OT_PREPROCESS );
                        $frame = $wgParser->getPreprocessor()->newFrame();
                        $wikitext = $wgParser->preprocess( $params['text'], $title_obj, $options, null, $frame );
                        if ( $params['prop'] === null ) {