Index: trunk/extensions/SlippyMap/SlippyMap.php |
— | — | @@ -41,7 +41,11 @@ |
42 | 42 | if ( !defined( 'MEDIAWIKI' ) ) |
43 | 43 | die(); |
44 | 44 | |
45 | | -$wgExtensionFunctions[] = 'wfslippymap'; |
| 45 | +if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) { |
| 46 | + $wgHooks['ParserFirstCallInit'][] = 'wfslippymap'; |
| 47 | +} else { |
| 48 | + $wgExtensionFunctions[] = 'wfslippymap'; |
| 49 | +} |
46 | 50 | |
47 | 51 | $wgExtensionCredits['parserhook'][] = array( |
48 | 52 | 'name' => 'OpenStreetMap Slippy Map', |
— | — | @@ -69,4 +73,5 @@ |
70 | 74 | # processing the text between the tags |
71 | 75 | $wgParser->setHook( 'slippymap', array( 'SlippyMap', 'parse' ) ); |
72 | 76 | $wgMapOfServiceUrl = "http://osm-tah-cache.firefishy.com/~ojw/MapOf/?"; |
| 77 | + return true; |
73 | 78 | } |
Index: trunk/extensions/SlippyMap/SlippyMap.class.php |
— | — | @@ -38,8 +38,6 @@ |
39 | 39 | # |
40 | 40 | |
41 | 41 | class SlippyMap { |
42 | | - function SlippyMap() { |
43 | | - } |
44 | 42 | |
45 | 43 | # The callback function for converting the input text to HTML output |
46 | 44 | static function parse( $input, $argv ) { |