r55636 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55635‎ | r55636 | r55637 >
Date:18:16, 27 August 2009
Author:beckr
Status:deferred
Tags:
Comment:
Load OpenLayers before SlippyMap (fixes JS dependency error)
Modified paths:
  • /trunk/extensions/SlippyMap/SlippyMap.hook.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SlippyMap/SlippyMap.hook.php
@@ -37,13 +37,13 @@
3838 // Hook for adding JS variables to <head>
3939 $wgHooks['MakeGlobalVariablesScript'][] = array( &$this, 'jsVariables' );
4040
41 - // Add JavaScript files to <head>
 41+ // Add JavaScript files to <head>, starting with OpenLayers so that it is available in SlippyMap.js
 42+ $wgOut->addScriptFile( $wgScriptPath . '/extensions/SlippyMap/OpenLayers/public/OpenLayers.js?' . $wgStyleVersion );
4243 if ( method_exists( $wgOut, 'addScriptClass' ) ) {
4344 $wgOut->addScriptClass( 'SlippyMap' );
4445 } else {
4546 $wgOut->addScriptFile( $wgScriptPath . '/extensions/SlippyMap/js/' . $wgSlippyMapJs . '?' . $wgStyleVersion );
4647 }
47 - $wgOut->addScriptFile( $wgScriptPath . '/extensions/SlippyMap/OpenLayers/public/OpenLayers.js?' . $wgStyleVersion );
4848
4949 // Add our CSS to <head>
5050 $wgOut->addExtensionStyle( $wgScriptPath . '/extensions/SlippyMap/SlippyMap.css?' . $wgStyleVersion );

Status & tagging log