Index: trunk/extensions/Maps/OpenStreetMap/Maps_OSMDispMap.php |
— | — | @@ -31,10 +31,9 @@ |
32 | 32 | |
33 | 33 | $this->spesificParameters = array( |
34 | 34 | 'static' => array( |
35 | | - 'criteria' => array( |
36 | | - 'in_array' => array('yes', 'no') |
37 | | - ), |
38 | | - 'default' => $egMapsOSMStaticAsDefault ? 'yes' : 'no' // TODO: boolean type |
| 35 | + 'type' => 'boolean', |
| 36 | + 'default' => $egMapsOSMStaticAsDefault, |
| 37 | + 'output-type' => 'boolean' |
39 | 38 | ), |
40 | 39 | 'mode' => array( |
41 | 40 | 'criteria' => array( |
— | — | @@ -43,10 +42,9 @@ |
44 | 43 | 'default' => $modes[0] |
45 | 44 | ), |
46 | 45 | 'activatable' => array( |
47 | | - 'criteria' => array( |
48 | | - 'in_array' => array('yes', 'no') |
49 | | - ), |
50 | | - 'default' => $egMapsOSMStaticActivatable ? 'yes' : 'no' // TODO: boolean type |
| 46 | + 'type' => 'boolean', |
| 47 | + 'default' => $egMapsOSMStaticActivatable, |
| 48 | + 'output-type' => 'boolean' |
51 | 49 | ), |
52 | 50 | ); |
53 | 51 | } |
— | — | @@ -87,7 +85,7 @@ |
88 | 86 | |
89 | 87 | EOT; |
90 | 88 | |
91 | | - $this->output .= $this->static == 'yes' ? $this->getStaticMap() : $this->getDynamicMap(); |
| 89 | + $this->output .= $this->static ? $this->getStaticMap() : $this->getDynamicMap(); |
92 | 90 | } |
93 | 91 | |
94 | 92 | /** |
— | — | @@ -123,7 +121,7 @@ |
124 | 122 | |
125 | 123 | $alt = wfMsg( 'maps_centred_on', $this->centre_lat, $this->centre_lon ); |
126 | 124 | |
127 | | - if ($this->activatable != 'no') { |
| 125 | + if ($this->activatable) { |
128 | 126 | $title = wfMsg('maps_click_to_activate'); |
129 | 127 | $activationCode = "onclick=\"slippymaps['$this->mapName'].init();\""; |
130 | 128 | } |
Index: trunk/extensions/Maps/GoogleMaps/Maps_GoogleMaps.php |
— | — | @@ -70,7 +70,7 @@ |
71 | 71 | 'criteria' => array( |
72 | 72 | 'in_array' => $allowedTypes |
73 | 73 | ), |
74 | | - 'default' => $egMapsGoogleMapsType, |
| 74 | + 'default' => $egMapsGoogleMapsType, // FIXME: default value should not be used when not present in types parameter. |
75 | 75 | 'output-type' => 'gmaptype' |
76 | 76 | ), |
77 | 77 | 'types' => array( |
Index: trunk/extensions/Maps/YahooMaps/Maps_YahooMaps.php |
— | — | @@ -69,7 +69,7 @@ |
70 | 70 | 'criteria' => array( |
71 | 71 | 'in_array' => $allowedTypes |
72 | 72 | ), |
73 | | - 'default' => $egMapsYahooMapsType, |
| 73 | + 'default' => $egMapsYahooMapsType, // FIXME: default value should not be used when not present in types parameter. |
74 | 74 | 'output-type' => 'ymaptype' |
75 | 75 | ), |
76 | 76 | 'types' => array ( |