Index: trunk/extensions/GoogleMaps/SpecialGoogleMapsKML.php |
— | — | @@ -33,14 +33,13 @@ |
34 | 34 | $exporter = new GoogleMapsKmlExporter($wgContLang, |
35 | 35 | str_replace('{label}', $mapOptions['icon'], $mapOptions['icons'])); |
36 | 36 | |
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 ); |
41 | 41 | |
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 ); |
45 | 44 | |
46 | 45 | if (preg_match_all("/<googlemap( .*?|)>(.*?)<\/googlemap>/s", $revision->getText(), $matches)) { |
47 | 46 | $exporter->addFileHeader(); |