r83235 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83234‎ | r83235 | r83236 >
Date:19:52, 4 March 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
fix parsing issue
Modified paths:
  • /trunk/extensions/Maps/includes/features/Maps_BasePointMap.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/includes/features/Maps_BasePointMap.php
@@ -115,9 +115,12 @@
116116 private function setMarkerData( Parser $parser, PPFrame $frame = null ) {
117117 global $wgTitle;
118118
119 - $this->title = $parser->recursiveTagParse( $this->title, $frame );
120 - $this->label = $parser->recursiveTagParse( $this->label, $frame );
 119+ // New parser object to render popup contents with.
 120+ $parser = new Parser();
121121
 122+ $this->title = $parser->parse( $this->title, $wgTitle, new ParserOptions() )->getText();
 123+ $this->label = $parser->parse( $this->label, $wgTitle, new ParserOptions() )->getText();
 124+
122125 // Each $args is an array containg the coordinate set as first element, possibly followed by meta data.
123126 foreach ( $this->coordinates as $args ) {
124127 $markerData = MapsCoordinateParser::parseCoordinates( array_shift( $args ) );
@@ -128,11 +131,11 @@
129132
130133 if ( count( $args ) > 0 ) {
131134 // Parse and add the point specific title if it's present.
132 - $markerData['title'] = $parser->recursiveTagParse( $args[0], $frame );
 135+ $markerData['title'] = $parser->parse( $args[0], $wgTitle, new ParserOptions() )->getText();
133136
134137 if ( count( $args ) > 1 ) {
135138 // Parse and add the point specific label if it's present.
136 - $markerData['label'] = $parser->recursiveTagParse( $args[1], $frame );
 139+ $markerData['label'] = $parser->parse( $args[1], $wgTitle, new ParserOptions() )->getText();
137140
138141 if ( count( $args ) > 2 ) {
139142 // Add the point specific icon if it's present.

Status & tagging log