http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72478
Revision: 72478
Author: jeroendedauw
Date: 2010-09-06 12:07:17 +0000 (Mon, 06 Sep 2010)
Log Message:
-----------
Changes for 0.7 - moved some stuff to Includes/
Modified Paths:
--------------
trunk/extensions/Maps/Maps.php
trunk/extensions/Maps/Maps_Settings.php
Added Paths:
-----------
trunk/extensions/Maps/Includes/features/
trunk/extensions/Maps/Includes/parserHooks/
trunk/extensions/Maps/Includes/services/
Removed Paths:
-------------
trunk/extensions/Maps/Features/
trunk/extensions/Maps/ParserHooks/
trunk/extensions/Maps/Services/
Modified: trunk/extensions/Maps/Maps.php
===================================================================
--- trunk/extensions/Maps/Maps.php 2010-09-06 11:59:02 UTC (rev 72477)
+++ trunk/extensions/Maps/Maps.php 2010-09-06 12:07:17 UTC (rev 72478)
@@ -54,11 +54,6 @@
$egMapsDir = dirname( __FILE__ ) . '/';
unset( $useExtensionPath );
- // To ensure Maps remains compatible with pre 1.16.
- if ( version_compare( $wgVersion, '1.16', '<' ) ) {
- $wgAutoloadClasses['Html'] = $egMapsDir . 'Compat/Html.php';
- }
-
$egMapsStyleVersion = $wgStyleVersion . '-' . Maps_VERSION;
$egMapsFeatures = array();
@@ -110,7 +105,7 @@
$wgAutoloadClasses['MapsYahooGeocoder'] = $geoDir .
'Maps_YahooGeocoder.php';
// Autoload the "ParserHooks/" classes.
- $phDir = dirname( __FILE__ ) . '/ParserHooks/';
+ $phDir = $incDir . '/parserHooks/';
$wgAutoloadClasses['MapsCoordinates'] = $phDir .
'Maps_Coordinates.php';
$wgAutoloadClasses['MapsDisplayMap'] = $phDir .
'Maps_DisplayMap.php';
$wgAutoloadClasses['MapsDisplayPoint'] = $phDir .
'Maps_DisplayPoint.php';
@@ -120,13 +115,13 @@
$wgAutoloadClasses['MapsGeodistance'] = $phDir .
'Maps_Geodistance.php';
// Load the "Service/" classes and interfaces.
- $srvDir = dirname( __FILE__ ) . '/Services/';
+ $srvDir = $incDir . '/services/';
$wgAutoloadClasses['iMappingService'] = $srvDir .
'iMappingService.php';
$wgAutoloadClasses['MapsMappingServices'] = $srvDir .
'Maps_MappingServices.php';
$wgAutoloadClasses['MapsMappingService'] = $srvDir .
'Maps_MappingService.php';
// Load the "Feature/" classes.
- $ftDir = dirname( __FILE__ ) . '/Features/';
+ $ftDir = $incDir . '/features/';
$wgAutoloadClasses['MapsBaseMap'] =
$ftDir . 'Maps_BaseMap.php';
$wgAutoloadClasses['MapsBasePointMap'] = $ftDir .
'Maps_BasePointMap.php';
@@ -134,6 +129,11 @@
// It's present in 1.16 as a stub, but lets check if it exists in case
it gets removed at some point.
if ( function_exists( 'wfLoadExtensionMessages' ) ) {
wfLoadExtensionMessages( 'Maps' );
+ }
+
+ // To ensure Maps remains compatible with pre 1.16.
+ if ( !array_key_exists( 'Html', $wgAutoloadClasses ) ) {
+ $wgAutoloadClasses['Html'] = $egMapsDir . 'Compat/Html.php';
}
wfRunHooks( 'MappingServiceLoad' );
Modified: trunk/extensions/Maps/Maps_Settings.php
===================================================================
--- trunk/extensions/Maps/Maps_Settings.php 2010-09-06 11:59:02 UTC (rev
72477)
+++ trunk/extensions/Maps/Maps_Settings.php 2010-09-06 12:07:17 UTC (rev
72478)
@@ -75,19 +75,19 @@
# Commenting or removing a mapping service will make Maps completely
ignore it, and so improve performance.
# Google Maps API v2
- include_once $egMapsDir . 'Services/GoogleMaps/GoogleMaps.php';
+ include_once $egMapsDir . 'Includes/services/GoogleMaps/GoogleMaps.php';
# Google Maps API v3
- include_once $egMapsDir . 'Services/GoogleMaps3/GoogleMaps3.php';
+ include_once $egMapsDir .
'Includes/services/GoogleMaps3/GoogleMaps3.php';
# OpenLayers API
- include_once $egMapsDir . 'Services/OpenLayers/OpenLayers.php';
+ include_once $egMapsDir . 'Includes/services/OpenLayers/OpenLayers.php';
# Yahoo! Maps API
- include_once $egMapsDir . 'Services/YahooMaps/YahooMaps.php';
+ include_once $egMapsDir . 'Includes/services/YahooMaps/YahooMaps.php';
# Yahoo! Maps API
- include_once $egMapsDir . 'Services/OSM/OSM.php';
+ include_once $egMapsDir . 'Includes/services/OSM/OSM.php';
# Array of String. Array containing all the mapping services that will
be made available to the user.
# Currently Maps provides the following services: googlemaps,
yahoomaps, openlayers, osm.
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs