r83367 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83366‎ | r83367 | r83368 >
Date:04:19, 6 March 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
some fixes
Modified paths:
  • /branches/Maps0.8/Maps.php (modified) (history)
  • /branches/Maps0.8/Maps_Settings.php (modified) (history)
  • /branches/Maps0.8/includes/parserHooks/Maps_DisplayPoint.php (modified) (history)
  • /branches/Maps0.8/includes/services/GoogleMaps3/jquery.googlemap.js (modified) (history)

Diff [purge]

Index: branches/Maps0.8/Maps.php
@@ -10,6 +10,7 @@
1111 * @file Maps.php
1212 * @ingroup Maps
1313 *
 14+ * @licence GNU GPL v3
1415 * @author Jeroen De Dauw < jeroendedauw@gmail.com >
1516 */
1617
Index: branches/Maps0.8/Maps_Settings.php
@@ -83,7 +83,7 @@
8484 # Commenting or removing a mapping service will make Maps completely ignore it, and so improve performance.
8585
8686 # Google Maps API v2
87 - include_once $egMapsDir . 'includes/services/GoogleMaps/GoogleMaps.php';
 87+ // include_once $egMapsDir . 'includes/services/GoogleMaps/GoogleMaps.php';
8888
8989 # Google Maps API v3
9090 include_once $egMapsDir . 'includes/services/GoogleMaps3/GoogleMaps3.php';
@@ -99,7 +99,7 @@
100100
101101 # Array of String. Array containing all the mapping services that will be made available to the user.
102102 $egMapsAvailableServices = array(
103 - 'googlemaps2',
 103+ //'googlemaps2',
104104 'googlemaps3',
105105 //'yahoomaps',
106106 'openlayers',
Index: branches/Maps0.8/includes/services/GoogleMaps3/jquery.googlemap.js
@@ -43,7 +43,7 @@
4444 title: location.title
4545 } );
4646
47 - this.openWindow = false;
 47+ marker.openWindow = false;
4848
4949 if ( location.text != '' ) {
5050 marker.text = location.text;
@@ -64,9 +64,9 @@
6565
6666 var bounds;
6767
68 - if ( ( options.centre === false || options.zoom === false ) && options.locations.lentgh > 1 ) {
 68+ if ( ( options.centre === false || options.zoom === false ) && options.locations.length > 1 ) {
6969 bounds = new google.maps.LatLngBounds();
70 -
 70+
7171 for ( var i = markers.length - 1; i >= 0; i-- ) {
7272 bounds.extend( markers[i].getPosition() );
7373 }
Index: branches/Maps0.8/includes/parserHooks/Maps_DisplayPoint.php
@@ -72,15 +72,10 @@
7373 $params['coordinates']->addDependencies( 'mappingservice', 'geoservice' );
7474 $params['coordinates']->setDescription( wfMsg( 'maps-displaypoints-par-coordinates' ) );
7575
76 - $params['centre'] = new Parameter(
77 - 'centre',
78 - Parameter::TYPE_STRING,
79 - false,
80 - array( 'center' ),
81 - array(
82 - new CriterionIsLocation(),
83 - )
84 - );
 76+ $params['centre'] = new Parameter( 'centre' );
 77+ $params['centre']->setDefault( false );
 78+ $params['centre']->addAliases( 'center' );
 79+ $params['centre']->addCriteria( new CriterionIsLocation() );
8580 $params['centre']->setDescription( wfMsg( 'maps-displaypoints-par-centre' ) );
8681 $params['centre']->setDoManipulationOfDefault( false );
8782 $manipulation = new MapsParamLocation();

Status & tagging log