From ca32f08966f1b51fcb19460f0996bb0c4048e6fe Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 3 Dec 2011 13:29:22 +0100 Subject: Update to MediaWiki 1.18.0 * also update ArchLinux skin to chagnes in MonoBook * Use only css to hide our menu bar when printing --- includes/api/ApiExpandTemplates.php | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'includes/api/ApiExpandTemplates.php') diff --git a/includes/api/ApiExpandTemplates.php b/includes/api/ApiExpandTemplates.php index 6f2df1b8..6ec18463 100644 --- a/includes/api/ApiExpandTemplates.php +++ b/includes/api/ApiExpandTemplates.php @@ -1,6 +1,6 @@ setRemoveComments( false ); + } + if ( $params['generatexml'] ) { $wgParser->startExternalParse( $title_obj, $options, OT_PREPROCESS ); $dom = $wgParser->preprocessToDom( $params['text'] ); @@ -86,8 +90,12 @@ class ApiExpandTemplates extends ApiBase { 'title' => array( ApiBase::PARAM_DFLT => 'API', ), - 'text' => null, + 'text' => array( + ApiBase::PARAM_TYPE => 'string', + ApiBase::PARAM_REQUIRED => true, + ), 'generatexml' => false, + 'includecomments' => false, ); } @@ -96,11 +104,12 @@ class ApiExpandTemplates extends ApiBase { 'text' => 'Wikitext to convert', 'title' => 'Title of page', 'generatexml' => 'Generate XML parse tree', + 'includecomments' => 'Whether to include HTML comments in the output', ); } public function getDescription() { - return 'This module expand all templates in wikitext'; + return 'Expands all templates in wikitext'; } protected function getExamples() { @@ -109,7 +118,11 @@ class ApiExpandTemplates extends ApiBase { ); } + public function getHelpUrls() { + return 'https://www.mediawiki.org/wiki/API:Parsing_wikitext#expandtemplates'; + } + public function getVersion() { - return __CLASS__ . ': $Id: ApiExpandTemplates.php 70647 2010-08-07 19:59:42Z ialex $'; + return __CLASS__ . ': $Id: ApiExpandTemplates.php 104449 2011-11-28 15:52:04Z reedy $'; } } -- cgit v1.2.3-54-g00ecf