r92457 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92456‎ | r92457 | r92458 >
Date:19:18, 18 July 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
fixed parser issue with mw 1.17
Modified paths:
  • /trunk/extensions/SemanticMaps/includes/queryprinters/SM_MapPrinter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMaps/includes/queryprinters/SM_MapPrinter.php
@@ -284,7 +284,6 @@
285285 protected function handleMarkerData( array &$params, array $queryLocations ) {
286286 global $wgParser;
287287
288 - $parserClone = clone $wgParser;
289288 $iconUrl = MapsMapper::getFileUrl( $params['icon'] );
290289 $params['locations'] = array();
291290
@@ -292,8 +291,8 @@
293292 if ( $location->isValid() ) {
294293 $jsonObj = $location->getJSONObject( $params['title'], $params['label'], $iconUrl );
295294
296 - $jsonObj['title'] = $parserClone->parse( $jsonObj['title'], $parserClone->getTitle(), new ParserOptions() )->getText();
297 - $jsonObj['text'] = $parserClone->parse( $jsonObj['text'], $parserClone->getTitle(), new ParserOptions() )->getText();
 295+ $jsonObj['title'] = $wgParser->parse( $jsonObj['title'], $wgParser->getTitle(), new ParserOptions() )->getText();
 296+ $jsonObj['text'] = $wgParser->parse( $jsonObj['text'], $wgParser->getTitle(), new ParserOptions() )->getText();
298297
299298 $hasTitleAndtext = $jsonObj['title'] != '' && $jsonObj['text'] != '';
300299 $jsonObj['text'] = ( $hasTitleAndtext ? '<b>' . $jsonObj['title'] . '</b><hr />' : $jsonObj['title'] ) . $jsonObj['text'];

Follow-up revisions

RevisionCommit summaryAuthorDate
r92468fu r92457jeroendedauw20:23, 18 July 2011