Index: trunk/extensions/Maps/Includes/Maps_Mapper.php |
— | — | @@ -168,7 +168,7 @@ |
169 | 169 | |
170 | 170 | // Determine the minimum and maximum values. |
171 | 171 | if ( preg_match( '/^.*%$/', $value ) ) { |
172 | | - if ( count( $egMapsSizeRestrictions[$dimension] >= 4 ) ) { |
| 172 | + if ( count( $egMapsSizeRestrictions[$dimension] ) >= 4 ) { |
173 | 173 | $min = $egMapsSizeRestrictions[$dimension][2]; |
174 | 174 | $max = $egMapsSizeRestrictions[$dimension][3]; |
175 | 175 | } else { |
— | — | @@ -183,15 +183,15 @@ |
184 | 184 | |
185 | 185 | // See if the actual value is withing the limits. |
186 | 186 | $number = preg_replace( '/[^0-9]/', '', $value ); |
187 | | - if ( $number < $egMapsSizeRestrictions[$dimension][0] ) { |
| 187 | + if ( $number < $min ) { |
188 | 188 | if ( $correct ) { |
189 | | - $value = $egMapsSizeRestrictions[$dimension][0]; |
| 189 | + $value = $min; |
190 | 190 | } else { |
191 | 191 | return false; |
192 | 192 | } |
193 | | - } else if ( $number > $egMapsSizeRestrictions[$dimension][1] ) { |
| 193 | + } else if ( $number > $max ) { |
194 | 194 | if ( $correct ) { |
195 | | - $value = $egMapsSizeRestrictions[$dimension][1]; |
| 195 | + $value = $max; |
196 | 196 | } else { |
197 | 197 | return false; |
198 | 198 | } |
Index: trunk/extensions/Maps/Maps.php |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | 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>.'; |
35 | 35 | } |
36 | 36 | else { |
37 | | - define( 'Maps_VERSION', '0.6.4 a8' ); |
| 37 | + define( 'Maps_VERSION', '0.6.4 a9' ); |
38 | 38 | |
39 | 39 | // The different coordinate notations. |
40 | 40 | define( 'Maps_COORDS_FLOAT', 'float' ); |