r64427 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64426‎ | r64427 | r64428 >
Date:07:11, 31 March 2010
Author:jeroendedauw
Status:deferred (Comments)
Tags:
Comment:
Changes for 0.6 - follow up on r64422 - Fixed some issues
Modified paths:
  • /trunk/extensions/Maps/GoogleMaps/Maps_GoogleMaps.php (modified) (history)
  • /trunk/extensions/Maps/GoogleMaps3/Maps_GoogleMaps3.php (modified) (history)
  • /trunk/extensions/Maps/Maps.php (modified) (history)
  • /trunk/extensions/Maps/Maps_Settings.php (modified) (history)
  • /trunk/extensions/Maps/OpenLayers/Maps_OpenLayers.php (modified) (history)
  • /trunk/extensions/Maps/YahooMaps/Maps_YahooMaps.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/GoogleMaps3/Maps_GoogleMaps3.php
@@ -24,6 +24,15 @@
2525
2626 $wgHooks['MappingServiceLoad'][] = 'MapsGoogleMaps3::initialize';
2727
 28+$wgAutoloadClasses['MapsGoogleMaps3DispMap'] = dirname( __FILE__ ) . '/Maps_GoogleMaps3DispMap.php';
 29+
 30+$egMapsServices[MapsGoogleMaps3::SERVICE_NAME] = array(
 31+ 'aliases' => array( 'google3', 'googlemap3', 'gmap3', 'gmaps3' ),
 32+ 'features' => array(
 33+ 'display_map' => 'MapsGoogleMaps3DispMap',
 34+ )
 35+);
 36+
2837 /**
2938 * Class for Google Maps v3 initialization.
3039 *
@@ -37,16 +46,7 @@
3847
3948 public static function initialize() {
4049 global $wgAutoloadClasses, $egMapsServices;
41 -
42 - $wgAutoloadClasses['MapsGoogleMaps3DispMap'] = dirname( __FILE__ ) . '/Maps_GoogleMaps3DispMap.php';
43 -
44 - $egMapsServices[self::SERVICE_NAME] = array(
45 - 'aliases' => array( 'google3', 'googlemap3', 'gmap3', 'gmaps3' ),
46 - 'features' => array(
47 - 'display_map' => 'MapsGoogleMaps3DispMap',
48 - )
49 - );
50 -
 50+
5151 self::initializeParams();
5252
5353 Validator::addOutputFormat( 'gmap3type', array( 'MapsGoogleMaps3', 'setGMapType' ) );
Index: trunk/extensions/Maps/OpenLayers/Maps_OpenLayers.php
@@ -24,6 +24,17 @@
2525
2626 $wgHooks['MappingServiceLoad'][] = 'MapsOpenLayers::initialize';
2727
 28+$wgAutoloadClasses['MapsOpenLayersDispMap'] = dirname( __FILE__ ) . '/Maps_OpenLayersDispMap.php';
 29+$wgAutoloadClasses['MapsOpenLayersDispPoint'] = dirname( __FILE__ ) . '/Maps_OpenLayersDispPoint.php';
 30+
 31+$egMapsServices[MapsOpenLayers::SERVICE_NAME] = array(
 32+ 'aliases' => array( 'layers', 'openlayer' ),
 33+ 'features' => array(
 34+ 'display_point' => 'MapsOpenLayersDispPoint',
 35+ 'display_map' => 'MapsOpenLayersDispMap',
 36+ )
 37+);
 38+
2839 /**
2940 * Class for OpenLayers initialization.
3041 *
@@ -40,17 +51,6 @@
4152
4253 $egMapsOLLoadedLayers = array();
4354
44 - $wgAutoloadClasses['MapsOpenLayersDispMap'] = dirname( __FILE__ ) . '/Maps_OpenLayersDispMap.php';
45 - $wgAutoloadClasses['MapsOpenLayersDispPoint'] = dirname( __FILE__ ) . '/Maps_OpenLayersDispPoint.php';
46 -
47 - $egMapsServices[self::SERVICE_NAME] = array(
48 - 'aliases' => array( 'layers', 'openlayer' ),
49 - 'features' => array(
50 - 'display_point' => 'MapsOpenLayersDispPoint',
51 - 'display_map' => 'MapsOpenLayersDispMap',
52 - )
53 - );
54 -
5555 self::initializeParams();
5656
5757 Validator::addOutputFormat( 'olgroups', array( __CLASS__, 'unpackLayerGroups' ) );
Index: trunk/extensions/Maps/Maps.php
@@ -51,6 +51,9 @@
5252
5353 $egMapsStyleVersion = $wgStyleVersion . '-' . Maps_VERSION;
5454
 55+ $egMapsFeatures = array();
 56+ $egMapsServices = array();
 57+
5558 // Include the settings file.
5659 require_once( $egMapsDir . 'Maps_Settings.php' );
5760
@@ -70,16 +73,13 @@
7174 global $egMapsDefaultService, $egMapsAvailableServices, $egMapsServices, $egMapsDefaultGeoService, $egMapsScriptPath;
7275 global $egMapsAvailableGeoServices, $egMapsDir, $egMapsAvailableFeatures, $egMapsUseMinJs, $egMapsJsExt, $egMapsStyleVersion;
7376
74 - $egMapsFeatures = array();
75 - $egMapsServices = array();
76 -
7777 // Autoload the general classes
7878 $wgAutoloadClasses['MapsCoordinateParser'] = $egMapsDir . 'Maps_CoordinateParser.php';
7979 $wgAutoloadClasses['MapsMapFeature'] = $egMapsDir . 'Maps_MapFeature.php';
8080 $wgAutoloadClasses['MapsMapper'] = $egMapsDir . 'Maps_Mapper.php';
8181
8282 wfLoadExtensionMessages( 'Maps' );
83 -
 83+
8484 wfRunHooks( 'MappingFeatureLoad' );
8585 wfRunHooks( 'MappingServiceLoad' );
8686
@@ -101,7 +101,11 @@
102102 'path' => __FILE__,
103103 'name' => wfMsg( 'maps_name' ),
104104 'version' => Maps_VERSION,
105 - 'author' => array( '[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]', '[http://www.mediawiki.org/wiki/User:Yaron_Koren Yaron Koren]', 'others' ),
 105+ 'author' => array(
 106+ '[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]',
 107+ '[http://www.mediawiki.org/wiki/User:Yaron_Koren Yaron Koren]',
 108+ '[http://www.ohloh.net/p/maps/contributors others]'
 109+ ),
106110 'url' => 'http://www.mediawiki.org/wiki/Extension:Maps',
107111 'description' => wfMsgExt( 'maps_desc', 'parsemag', $services_list ),
108112 );
Index: trunk/extensions/Maps/GoogleMaps/Maps_GoogleMaps.php
@@ -24,6 +24,17 @@
2525
2626 $wgHooks['MappingServiceLoad'][] = 'MapsGoogleMaps::initialize';
2727
 28+$wgAutoloadClasses['MapsGoogleMapsDispMap'] = dirname( __FILE__ ) . '/Maps_GoogleMapsDispMap.php';
 29+$wgAutoloadClasses['MapsGoogleMapsDispPoint'] = dirname( __FILE__ ) . '/Maps_GoogleMapsDispPoint.php';
 30+
 31+$egMapsServices[MapsGoogleMaps::SERVICE_NAME] = array(
 32+ 'aliases' => array( 'googlemaps', 'google', 'googlemap', 'gmap', 'gmaps' ),
 33+ 'features' => array(
 34+ 'display_point' => 'MapsGoogleMapsDispPoint',
 35+ 'display_map' => 'MapsGoogleMapsDispMap',
 36+ )
 37+);
 38+
2839 /**
2940 * Class for Google Maps initialization.
3041 *
@@ -38,17 +49,6 @@
3950 public static function initialize() {
4051 global $wgAutoloadClasses, $egMapsServices;
4152
42 - $wgAutoloadClasses['MapsGoogleMapsDispMap'] = dirname( __FILE__ ) . '/Maps_GoogleMapsDispMap.php';
43 - $wgAutoloadClasses['MapsGoogleMapsDispPoint'] = dirname( __FILE__ ) . '/Maps_GoogleMapsDispPoint.php';
44 -
45 - $egMapsServices[self::SERVICE_NAME] = array(
46 - 'aliases' => array( 'googlemaps', 'google', 'googlemap', 'gmap', 'gmaps' ),
47 - 'features' => array(
48 - 'display_point' => 'MapsGoogleMapsDispPoint',
49 - 'display_map' => 'MapsGoogleMapsDispMap',
50 - )
51 - );
52 -
5353 self::initializeParams();
5454
5555 Validator::addOutputFormat( 'gmaptype', array( __CLASS__, 'setGMapType' ) );
Index: trunk/extensions/Maps/YahooMaps/Maps_YahooMaps.php
@@ -23,7 +23,18 @@
2424 $wgAutoloadClasses['MapsYahooMaps'] = dirname( __FILE__ ) . '/Maps_YahooMaps.php';
2525
2626 $wgHooks['MappingServiceLoad'][] = 'MapsYahooMaps::initialize';
27 -
 27+
 28+$wgAutoloadClasses['MapsYahooMapsDispMap'] = dirname( __FILE__ ) . '/Maps_YahooMapsDispMap.php';
 29+$wgAutoloadClasses['MapsYahooMapsDispPoint'] = dirname( __FILE__ ) . '/Maps_YahooMapsDispPoint.php';
 30+
 31+$egMapsServices[MapsYahooMaps::SERVICE_NAME] = array(
 32+ 'aliases' => array( 'yahoo', 'yahoomap', 'ymap', 'ymaps' ),
 33+ 'features' => array(
 34+ 'display_point' => 'MapsYahooMapsDispPoint',
 35+ 'display_map' => 'MapsYahooMapsDispMap',
 36+ )
 37+);
 38+
2839 /**
2940 * Class for Yahoo! Maps initialization.
3041 *
@@ -37,18 +48,7 @@
3849
3950 public static function initialize() {
4051 global $wgAutoloadClasses, $egMapsServices;
41 -
42 - $wgAutoloadClasses['MapsYahooMapsDispMap'] = dirname( __FILE__ ) . '/Maps_YahooMapsDispMap.php';
43 - $wgAutoloadClasses['MapsYahooMapsDispPoint'] = dirname( __FILE__ ) . '/Maps_YahooMapsDispPoint.php';
44 -
45 - $egMapsServices[self::SERVICE_NAME] = array(
46 - 'aliases' => array( 'yahoo', 'yahoomap', 'ymap', 'ymaps' ),
47 - 'features' => array(
48 - 'display_point' => 'MapsYahooMapsDispPoint',
49 - 'display_map' => 'MapsYahooMapsDispMap',
50 - )
51 - );
52 -
 52+
5353 self::initializeParams();
5454
5555 Validator::addOutputFormat( 'ymaptype', array( __CLASS__, 'setYMapType' ) );
Index: trunk/extensions/Maps/Maps_Settings.php
@@ -27,8 +27,6 @@
2828 # The array element name contains an abbriviation, used for code references,
2929 # and in the service data arrays, the value is the human readible version for displaying purpouses.
3030
31 -# Initialization of the mapping features array.
32 -
3331 include_once $egMapsDir . 'Geocoders/Maps_Geocoders.php'; // Geocoders
3432 include_once $egMapsDir . 'ParserFunctions/Maps_ParserFunctions.php'; // Parser functions
3533

Follow-up revisions

RevisionCommit summaryAuthorDate
r64430Follow up to r64427jeroendedauw07:24, 31 March 2010
r64432Follow up to r64427jeroendedauw08:43, 31 March 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r64422Changes for 0.6 - Mayor rewrite of how services and features are hooked.jeroendedauw05:18, 31 March 2010

Comments

#Comment by Raymond (talk | contribs)   07:20, 31 March 2010

Seen at translatewiki:

PHP Strict Standards: Static function MapsBaseGeocoder::geocode() should not be abstract in /www/w/extensions/Maps/Geocoders/Maps_BaseGeocoder.php on line 25

#Comment by Jeroen De Dauw (talk | contribs)   07:24, 31 March 2010

r64430 should fix this.

#Comment by Raymond (talk | contribs)   08:36, 31 March 2010

The next one:

PHP Fatal error: Declaration of MapsBasePointMap::displayMap() must be compatible with that of iDisplayFunction::displayMap() in /www/w/extensions/Maps/ParserFunctions/DisplayPoint/Maps_BasePointMap.php on line 25

#Comment by Jeroen De Dauw (talk | contribs)   08:44, 31 March 2010

r64432 should fix that. Odd my wiki didn't give me that error.

Status & tagging log