http://www.mediawiki.org/wiki/Special:Code/MediaWiki/68283
Revision: 68283 Author: jeroendedauw Date: 2010-06-19 19:27:40 +0000 (Sat, 19 Jun 2010) Log Message: ----------- Fixed coordinate parsing issue and incremented version to 0.6.3 rc1 Modified Paths: -------------- trunk/extensions/Maps/Includes/Maps_CoordinateParser.php trunk/extensions/Maps/Maps.php trunk/extensions/SemanticMaps/SemanticMaps.php Modified: trunk/extensions/Maps/Includes/Maps_CoordinateParser.php =================================================================== --- trunk/extensions/Maps/Includes/Maps_CoordinateParser.php 2010-06-19 19:05:11 UTC (rev 68282) +++ trunk/extensions/Maps/Includes/Maps_CoordinateParser.php 2010-06-19 19:27:40 UTC (rev 68283) @@ -187,9 +187,9 @@ $coordinates = str_replace( array( '´', '´' ), Maps_GEO_SEC, $coordinates ); $coordinates = str_replace( array( '″', '″', Maps_GEO_SEC . Maps_GEO_SEC, '´´', '′′', '″' ), Maps_GEO_MIN, $coordinates ); $coordinates = str_replace( array( '′', '′', '´', '′' ), Maps_GEO_SEC, $coordinates ); - + $coordinates = self::removeInvalidChars( $coordinates ); - + return $coordinates; } @@ -202,13 +202,14 @@ */ protected static function removeInvalidChars( $string ) { $filtered = array(); - + foreach ( str_split( $string ) as $character ) { $asciiValue = ord( $character ); - if ( ( $asciiValue > 31 && $asciiValue < 127 ) ) { + if ( ( $asciiValue > 31 && $asciiValue < 127 ) || $asciiValue == 194 || $asciiValue == 176 ) { $filtered[] = $character; } + else {var_dump($asciiValue);} } return implode( '', $filtered ); Modified: trunk/extensions/Maps/Maps.php =================================================================== --- trunk/extensions/Maps/Maps.php 2010-06-19 19:05:11 UTC (rev 68282) +++ trunk/extensions/Maps/Maps.php 2010-06-19 19:27:40 UTC (rev 68283) @@ -33,7 +33,7 @@ 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>.'; } else { - define( 'Maps_VERSION', '0.6.3 a5' ); + define( 'Maps_VERSION', '0.6.3 rc1' ); // The different coordinate notations. define( 'Maps_COORDS_FLOAT', 'float' ); Modified: trunk/extensions/SemanticMaps/SemanticMaps.php =================================================================== --- trunk/extensions/SemanticMaps/SemanticMaps.php 2010-06-19 19:05:11 UTC (rev 68282) +++ trunk/extensions/SemanticMaps/SemanticMaps.php 2010-06-19 19:27:40 UTC (rev 68283) @@ -35,7 +35,7 @@ // Only initialize the extension when all dependencies are present. if ( defined( 'Maps_VERSION' ) && defined( 'SMW_VERSION' ) ) { - define( 'SM_VERSION', '0.6.3 a5' ); + define( 'SM_VERSION', '0.6.3 rc1' ); $smgScriptPath = ( isset( $wgExtensionAssetsPath ) && $wgExtensionAssetsPath ? $wgExtensionAssetsPath : $wgScriptPath . '/extensions' ) . '/SemanticMaps'; $smgDir = dirname( __FILE__ ) . '/'; _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs