Index: trunk/extensions/Maps/Maps.php |
— | — | @@ -36,7 +36,7 @@ |
37 | 37 | die( '<b>Error:</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>.<br />' ); |
38 | 38 | } |
39 | 39 | else { |
40 | | - define( 'Maps_VERSION', '0.7.4' ); |
| 40 | + define( 'Maps_VERSION', '0.7.5 alpha' ); |
41 | 41 | |
42 | 42 | // The different coordinate notations. |
43 | 43 | define( 'Maps_COORDS_FLOAT', 'float' ); |
Index: trunk/extensions/Maps/Maps_Settings.php |
— | — | @@ -208,7 +208,7 @@ |
209 | 209 | |
210 | 210 | # Integer or string. The default width and height of a map. These values will |
211 | 211 | # only be used when the user does not provide them. |
212 | | - $egMapsMapWidth = '100%'; |
| 212 | + $egMapsMapWidth = 'auto'; |
213 | 213 | $egMapsMapHeight = 350; |
214 | 214 | |
215 | 215 | # Array. The minimum and maximum width and height for all maps. First min and |
Index: trunk/extensions/Maps/includes/manipulations/Maps_ParamDimension.php |
— | — | @@ -39,8 +39,12 @@ |
40 | 40 | * @since 0.7 |
41 | 41 | */ |
42 | 42 | public function doManipulation( &$value, Parameter $parameter, array &$parameters ) { |
43 | | - global $egMapsSizeRestrictions; |
| 43 | + global $egMapsSizeRestrictions, $egMapsMapWidth, $egMapsMapHeight; |
44 | 44 | |
| 45 | + if ( $value == 'auto' && $this->dimension == 'width' ) { |
| 46 | + return; |
| 47 | + } |
| 48 | + |
45 | 49 | // Set the default if the value is not valid. |
46 | 50 | if ( !preg_match( '/^\d+(\.\d+)?(px|ex|em|%)?$/', $value ) ) { |
47 | 51 | $value = $this->dimension == 'width' ? $egMapsMapWidth : $egMapsMapHeight; |
Index: trunk/extensions/Maps/includes/criteria/CriterionMapDimension.php |
— | — | @@ -39,6 +39,10 @@ |
40 | 40 | protected function doValidation( $value, Parameter $parameter, array $parameters ) { |
41 | 41 | global $egMapsSizeRestrictions; |
42 | 42 | |
| 43 | + if ( $value == 'auto' && $this->dimension == 'width' ) { |
| 44 | + return true; |
| 45 | + } |
| 46 | + |
43 | 47 | // See if the notation is valid. |
44 | 48 | if ( !preg_match( '/^\d+(\.\d+)?(px|ex|em|%)?$/', $value ) ) { |
45 | 49 | return false; |