Index: trunk/extensions/Maps/INSTALL |
— | — | @@ -1,4 +1,4 @@ |
2 | | -[[Maps 0.7.1]] |
| 2 | +[[Maps 0.7.2]] |
3 | 3 | |
4 | 4 | In order to use this version of Maps, you need to have Validator 0.3.6 installed. If you get a distribution |
5 | 5 | from this page, you don't need to bother this, since Validator comes bundled with every release, and will |
Index: trunk/extensions/Maps/Maps.php |
— | — | @@ -36,7 +36,7 @@ |
37 | 37 | echo '<b>Warning:</b> You need to have <a href="http://www.mediawiki.org/wiki/Extension:Validator">Validator</a> installed in order to use <a href="http://www.mediawiki.org/wiki/Extension:Maps">Maps</a>.'; |
38 | 38 | } |
39 | 39 | else { |
40 | | - define( 'Maps_VERSION', '0.7.1' ); |
| 40 | + define( 'Maps_VERSION', '0.7.2 alpha' ); |
41 | 41 | |
42 | 42 | // The different coordinate notations. |
43 | 43 | define( 'Maps_COORDS_FLOAT', 'float' ); |
Index: trunk/extensions/Maps/RELEASE-NOTES |
— | — | @@ -7,6 +7,11 @@ |
8 | 8 | http://mapping.referata.com/wiki/Maps/Version_history#Maps_change_log |
9 | 9 | |
10 | 10 | |
| 11 | +=== Maps 0.7.2 === |
| 12 | +(2010-1x-xx) |
| 13 | + |
| 14 | +* ... |
| 15 | + |
11 | 16 | === Maps 0.7.1 === |
12 | 17 | (2010-10-20) |
13 | 18 | |
Index: trunk/extensions/Maps/includes/Maps_Layer.php |
— | — | @@ -123,12 +123,6 @@ |
124 | 124 | protected function getParameterDefinitions() { |
125 | 125 | $params = array(); |
126 | 126 | |
127 | | - $params['type'] = new Parameter( 'type' ); |
128 | | - $params['type']->addCriteria( New CriterionInArray( array_keys( self::$types ) ) ); |
129 | | - |
130 | | - $params['label'] = new Parameter( 'label' ); |
131 | | - $params['label']->lowerCaseValue = false; |
132 | | - |
133 | 127 | $params[] = new Parameter( 'lowerbound', Parameter::TYPE_FLOAT ); |
134 | 128 | $params[] = new Parameter( 'upperbound', Parameter::TYPE_FLOAT ); |
135 | 129 | $params[] = new Parameter( 'leftbound', Parameter::TYPE_FLOAT ); |
— | — | @@ -136,12 +130,17 @@ |
137 | 131 | $params[] = new Parameter( 'width', Parameter::TYPE_FLOAT ); |
138 | 132 | $params[] = new Parameter( 'height', Parameter::TYPE_FLOAT ); |
139 | 133 | |
| 134 | + $params['type'] = new Parameter( 'type' ); |
| 135 | + $params['type']->addCriteria( New CriterionInArray( array_keys( self::$types ) ) ); |
| 136 | + $params['type']->addManipulations( new ParamManipulationFunctions( 'strtolower' ) ); |
| 137 | + |
140 | 138 | $params[] = new Parameter( 'zoomlevels', Parameter::TYPE_INTEGER, false ); |
141 | 139 | |
| 140 | + $params['label'] = new Parameter( 'label' ); |
| 141 | + |
142 | 142 | $params['source'] = new Parameter( 'source' ); |
143 | 143 | $params['source']->addCriteria( new CriterionIsImage() ); |
144 | 144 | $params['source']->addManipulations( new MapsParamImage() ); |
145 | | - $params['source']->lowerCaseValue = false; |
146 | 145 | |
147 | 146 | return $params; |
148 | 147 | } |
Index: trunk/extensions/Maps/includes/services/GoogleMaps3/Maps_ParamGMap3Type.php |
— | — | @@ -29,7 +29,7 @@ |
30 | 30 | * @since 0.7 |
31 | 31 | */ |
32 | 32 | public function doManipulation( &$value, Parameter $parameter, array &$parameters ) { |
33 | | - $value = 'google.maps.MapTypeId.' . MapsGoogleMaps3::$mapTypes[$value]; |
| 33 | + $value = 'google.maps.MapTypeId.' . MapsGoogleMaps3::$mapTypes[strtolower( $value )]; |
34 | 34 | } |
35 | 35 | |
36 | 36 | } |
\ No newline at end of file |
Index: trunk/extensions/Maps/includes/services/YahooMaps/Maps_ParamYMapType.php |
— | — | @@ -29,7 +29,7 @@ |
30 | 30 | * @since 0.7 |
31 | 31 | */ |
32 | 32 | public function doManipulation( &$value, Parameter $parameter, array &$parameters ) { |
33 | | - $value = MapsYahooMaps::$mapTypes[$value]; |
| 33 | + $value = MapsYahooMaps::$mapTypes[strtolower( $value )]; |
34 | 34 | } |
35 | 35 | |
36 | 36 | } |
\ No newline at end of file |
Index: trunk/extensions/Maps/includes/services/YahooMaps/Maps_YahooMaps.php |
— | — | @@ -48,22 +48,18 @@ |
49 | 49 | $params['zoom']->addCriteria( new CriterionInRange( 1, 13 ) ); |
50 | 50 | $params['zoom']->setDefault( self::getDefaultZoom() ); |
51 | 51 | |
52 | | - $params['controls'] = new ListParameter( |
53 | | - 'controls', |
54 | | - ListParameter::DEFAULT_DELIMITER, |
55 | | - Parameter::TYPE_STRING, |
56 | | - $egMapsYMapControls, |
57 | | - array(), |
58 | | - array( |
59 | | - new CriterionInArray( self::getControlNames() ), |
60 | | - ) |
61 | | - ); |
62 | | - $params['controls']->addManipulations( new ParamManipulationImplode( ',', "'" ) ); |
| 52 | + $params['controls'] = new ListParameter( 'controls' ); |
| 53 | + $params['controls']->setDefault( $egMapsYMapControls ); |
| 54 | + $params['controls']->addCriteria( new CriterionInArray( self::getControlNames() ) ); |
| 55 | + $params['controls']->addManipulations( |
| 56 | + new ParamManipulationFunctions( 'strtolower' ), |
| 57 | + new ParamManipulationImplode( ',', "'" ) |
| 58 | + ); |
63 | 59 | |
64 | 60 | $params['type'] = new Parameter( |
65 | 61 | 'type', |
66 | 62 | Parameter::TYPE_STRING, |
67 | | - $egMapsYahooMapsType,// FIXME: default value should not be used when not present in types parameter. |
| 63 | + $egMapsYahooMapsType, // FIXME: default value should not be used when not present in types parameter. |
68 | 64 | array(), |
69 | 65 | array( |
70 | 66 | new CriterionInArray( self::getTypeNames() ), |
Index: trunk/extensions/Maps/includes/services/OpenLayers/Maps_OpenLayers.php |
— | — | @@ -39,14 +39,16 @@ |
40 | 40 | $params['controls'] = new ListParameter( 'controls' ); |
41 | 41 | $params['controls']->setDefault( $egMapsOLControls ); |
42 | 42 | $params['controls']->addCriteria( new CriterionInArray( self::getControlNames() ) ); |
43 | | - $params['controls']->addManipulations( new ParamManipulationImplode( ',', "'" ) ); |
| 43 | + $params['controls']->addManipulations( |
| 44 | + new ParamManipulationFunctions( 'strtolower' ), |
| 45 | + new ParamManipulationImplode( ',', "'" ) |
| 46 | + ); |
44 | 47 | |
45 | 48 | $params['layers'] = new ListParameter( 'layers' ); |
46 | 49 | $params['layers']->addManipulations( new MapsParamOLLayers() ); |
47 | 50 | $params['layers']->setDoManipulationOfDefault( true ); |
48 | 51 | $params['layers']->addCriteria( new CriterionOLLayer() ); |
49 | 52 | $params['layers']->setDefault( $egMapsOLLayers ); |
50 | | - $params['layers']->lowerCaseValue = false; |
51 | 53 | |
52 | 54 | //$params['imagelayers'] = new ListParameter(); |
53 | 55 | } |
Index: trunk/extensions/Maps/includes/services/GoogleMaps/Maps_GoogleMaps.php |
— | — | @@ -48,17 +48,13 @@ |
49 | 49 | $params['zoom']->addCriteria( new CriterionInRange( 0, 20 ) ); |
50 | 50 | $params['zoom']->setDefault( self::getDefaultZoom() ); |
51 | 51 | |
52 | | - $params['controls'] = new ListParameter( |
53 | | - 'controls', |
54 | | - ListParameter::DEFAULT_DELIMITER, |
55 | | - Parameter::TYPE_STRING, |
56 | | - $egMapsGMapControls, |
57 | | - array(), |
58 | | - array( |
59 | | - new CriterionInArray( self::getControlNames() ), |
60 | | - ) |
61 | | - ); |
62 | | - $params['controls']->addManipulations( new ParamManipulationImplode( ',', "'" ) ); |
| 52 | + $params['controls'] = new ListParameter( 'controls' ); |
| 53 | + $params['controls']->setDefault( $egMapsGMapControls ); |
| 54 | + $params['controls']->addCriteria( new CriterionInArray( self::getControlNames() ) ); |
| 55 | + $params['controls']->addManipulations( |
| 56 | + new ParamManipulationFunctions( 'strtolower' ), |
| 57 | + new ParamManipulationImplode( ',', "'" ) |
| 58 | + ); |
63 | 59 | |
64 | 60 | $params['type'] = new Parameter( |
65 | 61 | 'type', |
— | — | @@ -91,24 +87,14 @@ |
92 | 88 | ); |
93 | 89 | $params['autozoom']->addManipulations( new ParamManipulationBoolstr() ); |
94 | 90 | |
95 | | - $params['kml'] = new ListParameter( |
96 | | - 'kml', |
97 | | - ListParameter::DEFAULT_DELIMITER, |
98 | | - Parameter::TYPE_STRING, |
99 | | - array() // TODO |
100 | | - ); |
| 91 | + $params['kml'] = new ListParameter( 'kml' ); |
| 92 | + $params['kml']->setDefault( array() ); |
101 | 93 | $params['kml']->addManipulations( new ParamManipulationImplode( ',', "'" ) ); |
102 | 94 | |
103 | | - $params['overlays'] = new ListParameter( |
104 | | - 'overlays', |
105 | | - ListParameter::DEFAULT_DELIMITER, |
106 | | - Parameter::TYPE_STRING, |
107 | | - $egMapsGMapOverlays, |
108 | | - array(), |
109 | | - array( |
110 | | - new CriterionGoogleOverlay( self::$overlayData ) |
111 | | - ) |
112 | | - ); |
| 95 | + $params['overlays'] = new ListParameter( 'overlays' ); |
| 96 | + $params['overlays']->setDefault( $egMapsGMapOverlays ); |
| 97 | + $params['overlays']->addCriteria( new CriterionGoogleOverlay( self::$overlayData ) ); |
| 98 | + $params['overlays']->addManipulations( new ParamManipulationFunctions( 'strtolower' ) ); // TODO |
113 | 99 | } |
114 | 100 | |
115 | 101 | /** |
Index: trunk/extensions/Maps/includes/services/GoogleMaps/Maps_ParamGMapType.php |
— | — | @@ -29,7 +29,7 @@ |
30 | 30 | * @since 0.7 |
31 | 31 | */ |
32 | 32 | public function doManipulation( &$value, Parameter $parameter, array &$parameters ) { |
33 | | - $value = MapsGoogleMaps::$mapTypes[$value]; |
| 33 | + $value = MapsGoogleMaps::$mapTypes[strtolower( $value )]; |
34 | 34 | } |
35 | 35 | |
36 | 36 | } |
\ No newline at end of file |
Index: trunk/extensions/Maps/includes/parserHooks/Maps_Coordinates.php |
— | — | @@ -67,11 +67,9 @@ |
68 | 68 | array(), |
69 | 69 | array( |
70 | 70 | new CriterionIsLocation(), |
71 | | - ) |
| 71 | + ) |
72 | 72 | ); |
73 | 73 | |
74 | | - $params['location']->lowerCaseValue = false; |
75 | | - |
76 | 74 | $params['format'] = new Parameter( |
77 | 75 | 'format', |
78 | 76 | Parameter::TYPE_STRING, |
— | — | @@ -80,7 +78,8 @@ |
81 | 79 | array( |
82 | 80 | new CriterionInArray( $egMapsAvailableCoordNotations ), |
83 | 81 | ) |
84 | | - ); |
| 82 | + ); |
| 83 | + $params['format']->addManipulations( new ParamManipulationFunctions( 'strtolower' ) ); |
85 | 84 | |
86 | 85 | $params['directional'] = new Parameter( |
87 | 86 | 'directional', |
Index: trunk/extensions/Maps/includes/parserHooks/Maps_DisplayPoint.php |
— | — | @@ -67,7 +67,6 @@ |
68 | 68 | $params['coordinates']->addAliases( 'coords', 'location', 'address', 'addresses', 'locations' ); |
69 | 69 | $params['coordinates']->addCriteria( new CriterionIsLocation( $type === ParserHook::TYPE_FUNCTION ? '~' : '|' ) ); |
70 | 70 | $params['coordinates']->addManipulations( new MapsParamCoordSet( $type === ParserHook::TYPE_FUNCTION ? '~' : '|' ) ); |
71 | | - $params['coordinates']->lowerCaseValue = false; |
72 | 71 | $params['coordinates']->addDependencies( 'mappingservice', 'geoservice' ); |
73 | 72 | |
74 | 73 | $params['centre'] = new Parameter( |
— | — | @@ -79,14 +78,12 @@ |
80 | 79 | new CriterionIsLocation(), |
81 | 80 | ) |
82 | 81 | ); |
83 | | - $params['centre']->lowerCaseValue = false; |
84 | 82 | |
85 | 83 | $params['title'] = new Parameter( |
86 | 84 | 'title', |
87 | 85 | Parameter::TYPE_STRING, |
88 | 86 | $egMapsDefaultTitle |
89 | 87 | ); |
90 | | - $params['title']->lowerCaseValue = false; |
91 | 88 | |
92 | 89 | $params['label'] = new Parameter( |
93 | 90 | 'label', |
— | — | @@ -94,7 +91,6 @@ |
95 | 92 | $egMapsDefaultLabel, |
96 | 93 | array( 'text' ) |
97 | 94 | ); |
98 | | - $params['label']->lowerCaseValue = false; |
99 | 95 | |
100 | 96 | $params['icon'] = new Parameter( |
101 | 97 | 'icon', |
— | — | @@ -105,7 +101,6 @@ |
106 | 102 | New CriterionNotEmpty() |
107 | 103 | ) |
108 | 104 | ); |
109 | | - $params['icon']->lowerCaseValue = false; |
110 | 105 | |
111 | 106 | return $params; |
112 | 107 | } |
Index: trunk/extensions/Maps/includes/parserHooks/Maps_Finddestination.php |
— | — | @@ -61,7 +61,6 @@ |
62 | 62 | |
63 | 63 | $params['location'] = new Parameter( 'location' ); |
64 | 64 | $params['location']->addCriteria( new CriterionIsLocation() ); |
65 | | - $params['location']->lowerCaseValue = false; |
66 | 65 | $params['location']->addDependencies( 'mappingservice', 'geoservice' ); |
67 | 66 | |
68 | 67 | $params['bearing'] = new Parameter( |
— | — | @@ -71,6 +70,7 @@ |
72 | 71 | |
73 | 72 | $params['distance'] = new Parameter( 'distance' ); |
74 | 73 | $params['distance']->addCriteria( new CriterionIsDistance() ); |
| 74 | + // TODO: manipulate to distance object |
75 | 75 | |
76 | 76 | $params['mappingservice'] = new Parameter( |
77 | 77 | 'mappingservice', |
— | — | @@ -81,6 +81,7 @@ |
82 | 82 | new CriterionInArray( MapsMappingServices::getAllServiceValues() ), |
83 | 83 | ) |
84 | 84 | ); |
| 85 | + $params['mappingservice']->addManipulations( new ParamManipulationFunctions( 'strtolower' ) ); |
85 | 86 | |
86 | 87 | $params['geoservice'] = new Parameter( |
87 | 88 | 'geoservice', |
— | — | @@ -90,7 +91,8 @@ |
91 | 92 | array( |
92 | 93 | new CriterionInArray( $egMapsAvailableGeoServices ), |
93 | 94 | ) |
94 | | - ); |
| 95 | + ); |
| 96 | + $params['geoservice']->addManipulations( new ParamManipulationFunctions( 'strtolower' ) ); |
95 | 97 | |
96 | 98 | $params['allowcoordinates'] = new Parameter( |
97 | 99 | 'allowcoordinates', |
— | — | @@ -106,7 +108,8 @@ |
107 | 109 | array( |
108 | 110 | new CriterionInArray( $egMapsAvailableCoordNotations ), |
109 | 111 | ) |
110 | | - ); |
| 112 | + ); |
| 113 | + $params['format']->addManipulations( new ParamManipulationFunctions( 'strtolower' ) ); |
111 | 114 | |
112 | 115 | $params['directional'] = new Parameter( |
113 | 116 | 'directional', |
Index: trunk/extensions/Maps/includes/parserHooks/Maps_DisplayMap.php |
— | — | @@ -68,7 +68,6 @@ |
69 | 69 | $params['coordinates']->addAliases( 'coords', 'location', 'address' ); |
70 | 70 | $params['coordinates']->addCriteria( new CriterionIsLocation() ); |
71 | 71 | $params['coordinates']->addManipulations( new MapsParamCoordSet() ); |
72 | | - $params['coordinates']->lowerCaseValue = false; |
73 | 72 | $params['coordinates']->addDependencies( 'mappingservice', 'geoservice' ); |
74 | 73 | |
75 | 74 | return $params; |
Index: trunk/extensions/Maps/includes/parserHooks/Maps_Geocode.php |
— | — | @@ -61,7 +61,6 @@ |
62 | 62 | $params = array(); |
63 | 63 | |
64 | 64 | $params['location'] = new Parameter( 'location' ); |
65 | | - $params['location']->lowerCaseValue = false; |
66 | 65 | $params['location']->addDependencies( 'mappingservice', 'geoservice' ); |
67 | 66 | $params['location']->addCriteria( new CriterionIsLocation() ); |
68 | 67 | |
— | — | @@ -74,6 +73,7 @@ |
75 | 74 | new CriterionInArray( MapsMappingServices::getAllServiceValues() ), |
76 | 75 | ) |
77 | 76 | ); |
| 77 | + $params['mappingservice']->addManipulations( new ParamManipulationFunctions( 'strtolower' ) ); |
78 | 78 | |
79 | 79 | $params['geoservice'] = new Parameter( |
80 | 80 | 'geoservice', |
— | — | @@ -83,13 +83,14 @@ |
84 | 84 | array( |
85 | 85 | new CriterionInArray( $egMapsAvailableGeoServices ), |
86 | 86 | ) |
87 | | - ); |
| 87 | + ); |
| 88 | + $params['geoservice']->addManipulations( new ParamManipulationFunctions( 'strtolower' ) ); |
88 | 89 | |
89 | 90 | $params['allowcoordinates'] = new Parameter( |
90 | 91 | 'allowcoordinates', |
91 | 92 | Parameter::TYPE_BOOLEAN, |
92 | 93 | $egMapsAllowCoordsGeocoding |
93 | | - ); |
| 94 | + ); |
94 | 95 | |
95 | 96 | $params['format'] = new Parameter( |
96 | 97 | 'format', |
— | — | @@ -98,8 +99,9 @@ |
99 | 100 | array( 'notation' ), |
100 | 101 | array( |
101 | 102 | new CriterionInArray( $egMapsAvailableCoordNotations ), |
102 | | - ) |
103 | | - ); |
| 103 | + ) |
| 104 | + ); |
| 105 | + $params['format']->addManipulations( new ParamManipulationFunctions( 'strtolower' ) ); |
104 | 106 | |
105 | 107 | $params['directional'] = new Parameter( |
106 | 108 | 'directional', |
Index: trunk/extensions/Maps/includes/parserHooks/Maps_Geodistance.php |
— | — | @@ -67,7 +67,6 @@ |
68 | 68 | new CriterionIsLocation(), |
69 | 69 | ) |
70 | 70 | ); |
71 | | - $params['location1']->lowerCaseValue = false; |
72 | 71 | $params['location1']->addDependencies( 'mappingservice', 'geoservice' ); |
73 | 72 | |
74 | 73 | $params['location2'] = new Parameter( |
— | — | @@ -79,7 +78,6 @@ |
80 | 79 | new CriterionIsLocation(), |
81 | 80 | ) |
82 | 81 | ); |
83 | | - $params['location2']->lowerCaseValue = false; |
84 | 82 | $params['location2']->addDependencies( 'mappingservice', 'geoservice' ); |
85 | 83 | |
86 | 84 | $params['unit'] = new Parameter( |
— | — | @@ -90,7 +88,8 @@ |
91 | 89 | array( |
92 | 90 | new CriterionInArray( MapsDistanceParser::getUnits() ), |
93 | 91 | ) |
94 | | - ); |
| 92 | + ); |
| 93 | + $params['unit']->addManipulations( new ParamManipulationFunctions( 'strtolower' ) ); |
95 | 94 | |
96 | 95 | $params['decimals'] = new Parameter( |
97 | 96 | 'decimals', |
— | — | @@ -107,6 +106,7 @@ |
108 | 107 | new CriterionInArray( MapsMappingServices::getAllServiceValues() ), |
109 | 108 | ) |
110 | 109 | ); |
| 110 | + $params['mappingservice']->addManipulations( new ParamManipulationFunctions( 'strtolower' ) ); |
111 | 111 | |
112 | 112 | $params['geoservice'] = new Parameter( |
113 | 113 | 'geoservice', |
— | — | @@ -116,7 +116,8 @@ |
117 | 117 | array( |
118 | 118 | new CriterionInArray( $egMapsAvailableGeoServices ), |
119 | 119 | ) |
120 | | - ); |
| 120 | + ); |
| 121 | + $params['geoservice']->addManipulations( new ParamManipulationFunctions( 'strtolower' ) ); |
121 | 122 | |
122 | 123 | return $params; |
123 | 124 | } |