r87226 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87225‎ | r87226 | r87227 >
Date:22:11, 1 May 2011
Author:reedy
Status:ok
Tags:
Comment:
* (bug 28265) allow outputting of comments for action=expandtemplates
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiExpandTemplates.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiExpandTemplates.php
@@ -61,6 +61,10 @@
6262 global $wgParser;
6363 $options = new ParserOptions();
6464
 65+ if ( $params['includecomments'] ) {
 66+ $options->setRemoveComments( false );
 67+ }
 68+
6569 if ( $params['generatexml'] ) {
6670 $wgParser->startExternalParse( $title_obj, $options, OT_PREPROCESS );
6771 $dom = $wgParser->preprocessToDom( $params['text'] );
@@ -88,6 +92,7 @@
8993 ),
9094 'text' => null,
9195 'generatexml' => false,
 96+ 'includecomments' => false,
9297 );
9398 }
9499
@@ -96,6 +101,7 @@
97102 'text' => 'Wikitext to convert',
98103 'title' => 'Title of page',
99104 'generatexml' => 'Generate XML parse tree',
 105+ 'includecomments' => 'Whether to include HTML comments in the output',
100106 );
101107 }
102108
Index: trunk/phase3/RELEASE-NOTES
@@ -371,6 +371,7 @@
372372 * Get a list of all subscribed hooks, and those subscribers
373373 * (bug 28225) Allow hiding of user groups in list=allusers
374374 * (bug 27185) API: Add Special:ComparePages
 375+* (bug 28265) allow outputting of comments for action=expandtemplates
375376
376377 === Languages updated in 1.18 ===
377378

Status & tagging log