Index: trunk/extensions/SemanticGoogleMaps/SemanticGoogleMaps.php |
— | — | @@ -26,7 +26,7 @@ |
27 | 27 | // credits |
28 | 28 | $wgExtensionCredits['parserhook'][] = array( |
29 | 29 | 'name' => 'Semantic Google Maps', |
30 | | - 'version' => '0.3.3', |
| 30 | + 'version' => '0.3.4', |
31 | 31 | 'author' => array( 'Robert Buzink', 'Yaron Koren' ), |
32 | 32 | 'url' => 'http://www.mediawiki.org/wiki/Extension:Semantic_Google_Maps', |
33 | 33 | 'description' => 'Allows users to add Google Maps to wiki pages based on structured data', |
— | — | @@ -43,7 +43,13 @@ |
44 | 44 | } |
45 | 45 | |
46 | 46 | include_once('SGM_QueryPrinter.php'); |
47 | | - SMWQueryProcessor::$formats['googlemap'] = 'SGMResultPrinter'; |
| 47 | + // global variable introduced in SMW 1.2.2 |
| 48 | + global $smwgResultFormats; |
| 49 | + if (isset($smwgResultFormats)) |
| 50 | + $smwgResultFormats['googlemap'] = 'SGMResultPrinter'; |
| 51 | + else |
| 52 | + SMWQueryProcessor::$formats['googlemap'] = 'SGMResultPrinter'; |
| 53 | + |
48 | 54 | } |
49 | 55 | |
50 | 56 | function sgmFunctionMagic( &$magicWords, $langCode ) { |