Index: trunk/extensions/Maps/ParserFunctions/Maps_ParserFunctions.php |
— | — | @@ -53,14 +53,13 @@ |
54 | 54 | 'criteria' => array( |
55 | 55 | 'in_array' => $egMapsAvailableServices |
56 | 56 | ), |
57 | | - 'default' => $egMapsDefaultServices['pf'] |
58 | 57 | ), |
59 | 58 | 'coordinates' => array( |
60 | 59 | 'aliases' => array( 'coords', 'location', 'locations' ), |
61 | 60 | ), |
62 | 61 | 'geoservice' => array( |
63 | 62 | 'criteria' => array( |
64 | | - 'in_array' => array_keys( $egMapsAvailableGeoServices ) |
| 63 | + 'in_array' => $egMapsAvailableGeoServices |
65 | 64 | ), |
66 | 65 | 'default' => $egMapsDefaultGeoService |
67 | 66 | ), |
Index: trunk/extensions/Maps/ParserFunctions/DisplayPoint/Maps_DisplayPoint.php |
— | — | @@ -68,25 +68,31 @@ |
69 | 69 | } |
70 | 70 | |
71 | 71 | private static function initializeParams() { |
72 | | - global $egMapsDefaultCentre, $egMapsDefaultTitle, $egMapsDefaultLabel; |
| 72 | + global $egMapsDefaultCentre, $egMapsDefaultTitle, $egMapsDefaultLabel, $egMapsDefaultServices; |
73 | 73 | |
74 | | - self::$parameters = array_merge( MapsParserFunctions::$parameters, array( |
75 | | - 'centre' => array( |
76 | | - 'aliases' => array( 'center' ), |
77 | | - 'default' => $egMapsDefaultCentre |
| 74 | + self::$parameters = array_merge( |
| 75 | + MapsParserFunctions::$parameters, |
| 76 | + array( |
| 77 | + 'service' => array( |
| 78 | + 'default' => $egMapsDefaultServices['display_map'] |
| 79 | + ), |
| 80 | + 'centre' => array( |
| 81 | + 'aliases' => array( 'center' ), |
| 82 | + 'default' => $egMapsDefaultCentre |
78 | 83 | ), |
79 | | - 'title' => array( |
80 | | - 'default' => $egMapsDefaultTitle |
| 84 | + 'title' => array( |
| 85 | + 'default' => $egMapsDefaultTitle |
81 | 86 | ), |
82 | | - 'label' => array( |
83 | | - 'default' => $egMapsDefaultLabel |
| 87 | + 'label' => array( |
| 88 | + 'default' => $egMapsDefaultLabel |
84 | 89 | ), |
85 | | - 'icon' => array( |
86 | | - 'criteria' => array( |
87 | | - 'not_empty' => array() |
| 90 | + 'icon' => array( |
| 91 | + 'criteria' => array( |
| 92 | + 'not_empty' => array() |
88 | 93 | ) |
89 | 94 | ), |
90 | | - ) ); |
| 95 | + ) |
| 96 | + ); |
91 | 97 | } |
92 | 98 | |
93 | 99 | } |
\ No newline at end of file |
Index: trunk/extensions/Maps/ParserFunctions/DisplayMap/Maps_DisplayMap.php |
— | — | @@ -65,12 +65,18 @@ |
66 | 66 | $args = func_get_args(); |
67 | 67 | return MapsParserFunctions::getMapHtml( $parser, $args, 'display_map' ); |
68 | 68 | } |
69 | | - |
| 69 | + |
70 | 70 | private static function initializeParams() { |
71 | | - global $egMapsAvailableGeoServices, $egMapsDefaultGeoService; |
72 | | - |
73 | | - self::$parameters = array_merge( MapsParserFunctions::$parameters, array( |
74 | | - ) ); |
| 71 | + global $egMapsAvailableGeoServices, $egMapsDefaultGeoService, $egMapsDefaultServices; |
| 72 | + |
| 73 | + self::$parameters = array_merge( |
| 74 | + MapsParserFunctions::$parameters, |
| 75 | + array( |
| 76 | + 'service' => array( |
| 77 | + 'default' => $egMapsDefaultServices['display_map'] |
| 78 | + ), |
| 79 | + ) |
| 80 | + ); |
75 | 81 | } |
76 | 82 | |
77 | 83 | } |
\ No newline at end of file |
Index: trunk/extensions/Maps/ParserFunctions/Geocode/Maps_GeocodeFunctions.php |
— | — | @@ -103,12 +103,12 @@ |
104 | 104 | 'mappingservice' => array( |
105 | 105 | 'criteria' => array( |
106 | 106 | 'in_array' => $egMapsAvailableServices |
107 | | - ), |
108 | | - 'default' => $egMapsDefaultServices['pf'] |
| 107 | + ), |
| 108 | + 'default' => false |
109 | 109 | ), |
110 | 110 | 'service' => array( |
111 | 111 | 'criteria' => array( |
112 | | - 'in_array' => array_keys( $egMapsAvailableGeoServices ) |
| 112 | + 'in_array' => $egMapsAvailableGeoServices |
113 | 113 | ), |
114 | 114 | 'default' => $egMapsDefaultGeoService |
115 | 115 | ), |
Index: trunk/extensions/Maps/OpenStreetMap/Maps_OSM.php |
— | — | @@ -14,6 +14,8 @@ |
15 | 15 | * @ingroup MapsOpenStreetMap |
16 | 16 | * |
17 | 17 | * @author Jeroen De Dauw |
| 18 | + * |
| 19 | + * FIXME: this file has not been changed to work with 0.6 |
18 | 20 | */ |
19 | 21 | |
20 | 22 | if ( !defined( 'MEDIAWIKI' ) ) { |
Index: trunk/extensions/Maps/Maps_CoordinateParser.php |
— | — | @@ -27,6 +27,8 @@ |
28 | 28 | */ |
29 | 29 | class MapsCoordinateParser { |
30 | 30 | |
| 31 | + protected static $mSeperators = array( ',', ';' ); |
| 32 | + |
31 | 33 | protected static $mI18nDirections = false; // Cache for localised direction labels |
32 | 34 | protected static $mDirections; // Cache for English direction labels |
33 | 35 | |
Index: trunk/extensions/Maps/Geocoders/Maps_Geocoder.php |
— | — | @@ -60,7 +60,7 @@ |
61 | 61 | * |
62 | 62 | * @return formatted coordinate string or false |
63 | 63 | */ |
64 | | - public static function attemptToGeocodeToString( $coordsOrAddress, $service = '', $mappingService = '', $checkForCoords = true, $targetFormat = Maps_COORDS_FLOAT, $directional = false ) { |
| 64 | + public static function attemptToGeocodeToString( $coordsOrAddress, $service = '', $mappingService = false, $checkForCoords = true, $targetFormat = Maps_COORDS_FLOAT, $directional = false ) { |
65 | 65 | $geoValues = self::attemptToGeocode( $coordsOrAddress, $service, $mappingService, $checkForCoords ); |
66 | 66 | return $geoValues ? MapsCoordinateParser::formatCoordinates( $geoValues, $targetFormat, $directional ) : false; |
67 | 67 | } |
— | — | @@ -109,7 +109,7 @@ |
110 | 110 | global $egMapsAvailableGeoServices, $egMapsDefaultGeoService, $egMapsGeoOverrides, $egMapsUserGeoOverrides; |
111 | 111 | |
112 | 112 | if ( $service == '' ) { |
113 | | - if ( $egMapsUserGeoOverrides ) { |
| 113 | + if ( $egMapsUserGeoOverrides && $mappingService ) { |
114 | 114 | // If no service has been provided, check if there are overrides for the default. |
115 | 115 | foreach ( $egMapsAvailableGeoServices as $geoService ) { |
116 | 116 | if ( array_key_exists( $geoService, $egMapsGeoOverrides ) && in_array( $mappingService, $egMapsGeoOverrides[$geoService] ) ) { |