http://www.mediawiki.org/wiki/Special:Code/MediaWiki/92457

Revision: 92457
Author:   jeroendedauw
Date:     2011-07-18 19:18:48 +0000 (Mon, 18 Jul 2011)
Log Message:
-----------
fixed parser issue with mw 1.17

Modified Paths:
--------------
    trunk/extensions/SemanticMaps/includes/queryprinters/SM_MapPrinter.php

Modified: trunk/extensions/SemanticMaps/includes/queryprinters/SM_MapPrinter.php
===================================================================
--- trunk/extensions/SemanticMaps/includes/queryprinters/SM_MapPrinter.php      
2011-07-18 18:59:56 UTC (rev 92456)
+++ trunk/extensions/SemanticMaps/includes/queryprinters/SM_MapPrinter.php      
2011-07-18 19:18:48 UTC (rev 92457)
@@ -284,7 +284,6 @@
        protected function handleMarkerData( array &$params, array 
$queryLocations ) {
                global $wgParser;
 
-               $parserClone = clone $wgParser;         
                $iconUrl = MapsMapper::getFileUrl( $params['icon'] );
                $params['locations'] = array();
 
@@ -292,8 +291,8 @@
                        if ( $location->isValid() ) {
                                $jsonObj = $location->getJSONObject( 
$params['title'], $params['label'], $iconUrl );
                                
-                               $jsonObj['title'] = $parserClone->parse( 
$jsonObj['title'], $parserClone->getTitle(), new ParserOptions() )->getText();
-                               $jsonObj['text'] = $parserClone->parse( 
$jsonObj['text'], $parserClone->getTitle(), new ParserOptions() )->getText();
+                               $jsonObj['title'] = $wgParser->parse( 
$jsonObj['title'], $wgParser->getTitle(), new ParserOptions() )->getText();
+                               $jsonObj['text'] = $wgParser->parse( 
$jsonObj['text'], $wgParser->getTitle(), new ParserOptions() )->getText();
                                
                                $hasTitleAndtext = $jsonObj['title'] != '' && 
$jsonObj['text'] != '';
                                $jsonObj['text'] = ( $hasTitleAndtext ? '<b>' . 
$jsonObj['title'] . '</b><hr />' : $jsonObj['title'] ) . $jsonObj['text'];


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to