r81757 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81756‎ | r81757 | r81758 >
Date:15:45, 8 February 2011
Author:platonides
Status:deferred
Tags:
Comment:
Manual initialization to startExternalParse().
This extension is a Parser mess anyway.
Spaces to tabs.
Modified paths:
  • /trunk/extensions/GoogleMaps/SpecialGoogleMapsKML.php (modified) (history)

Diff [purge]

Index: trunk/extensions/GoogleMaps/SpecialGoogleMapsKML.php
@@ -33,14 +33,13 @@
3434 $exporter = new GoogleMapsKmlExporter($wgContLang,
3535 str_replace('{label}', $mapOptions['icon'], $mapOptions['icons']));
3636
37 - $wgParser->mOptions = ParserOptions::newFromUser( $wgUser );
38 - $wgParser->mOptions->setEditSection( false );
39 - $wgParser->mTitle = $wgTitle;
40 - $wgParser->clearState();
 37+ $popts = ParserOptions::newFromUser( $wgUser );
 38+ $popts->setEditSection( false );
 39+
 40+ $wgParser->startExternalParse( $wgTitle, $popts, OT_WIKI, true );
4141
42 - $localParser = new Parser();
43 - $localParser->mTitle = $title;
44 - $localParser->mOptions = $wgParser->mOptions;
 42+ $localParser = new Parser();
 43+ $localParser->startExternalParse( $wgTitle, $popts, OT_WIKI, true );
4544
4645 if (preg_match_all("/<googlemap( .*?|)>(.*?)<\/googlemap>/s", $revision->getText(), $matches)) {
4746 $exporter->addFileHeader();

Status & tagging log