r44282 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44281‎ | r44282 | r44283 >
Date:15:35, 7 December 2008
Author:nikerabbit
Status:ok
Tags:
Comment:
* Delay loading
Modified paths:
  • /trunk/extensions/SlippyMap/SlippyMap.class.php (modified) (history)
  • /trunk/extensions/SlippyMap/SlippyMap.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SlippyMap/SlippyMap.php
@@ -41,7 +41,11 @@
4242 if ( !defined( 'MEDIAWIKI' ) )
4343 die();
4444
45 -$wgExtensionFunctions[] = 'wfslippymap';
 45+if ( defined( 'MW_SUPPORTS_PARSERFIRSTCALLINIT' ) ) {
 46+ $wgHooks['ParserFirstCallInit'][] = 'wfslippymap';
 47+} else {
 48+ $wgExtensionFunctions[] = 'wfslippymap';
 49+}
4650
4751 $wgExtensionCredits['parserhook'][] = array(
4852 'name' => 'OpenStreetMap Slippy Map',
@@ -69,4 +73,5 @@
7074 # processing the text between the tags
7175 $wgParser->setHook( 'slippymap', array( 'SlippyMap', 'parse' ) );
7276 $wgMapOfServiceUrl = "http://osm-tah-cache.firefishy.com/~ojw/MapOf/?";
 77+ return true;
7378 }
Index: trunk/extensions/SlippyMap/SlippyMap.class.php
@@ -38,8 +38,6 @@
3939 #
4040
4141 class SlippyMap {
42 - function SlippyMap() {
43 - }
4442
4543 # The callback function for converting the input text to HTML output
4644 static function parse( $input, $argv ) {

Status & tagging log