r68283 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68282‎ | r68283 | r68284 >
Date:19:27, 19 June 2010
Author:jeroendedauw
Status:deferred (Comments)
Tags:
Comment:
Fixed coordinate parsing issue and incremented version to 0.6.3 rc1
Modified paths:
  • /trunk/extensions/Maps/Includes/Maps_CoordinateParser.php (modified) (history)
  • /trunk/extensions/Maps/Maps.php (modified) (history)
  • /trunk/extensions/SemanticMaps/SemanticMaps.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMaps/SemanticMaps.php
@@ -35,7 +35,7 @@
3636
3737 // Only initialize the extension when all dependencies are present.
3838 if ( defined( 'Maps_VERSION' ) && defined( 'SMW_VERSION' ) ) {
39 - define( 'SM_VERSION', '0.6.3 a5' );
 39+ define( 'SM_VERSION', '0.6.3 rc1' );
4040
4141 $smgScriptPath = ( isset( $wgExtensionAssetsPath ) && $wgExtensionAssetsPath ? $wgExtensionAssetsPath : $wgScriptPath . '/extensions' ) . '/SemanticMaps';
4242 $smgDir = dirname( __FILE__ ) . '/';
Index: trunk/extensions/Maps/Includes/Maps_CoordinateParser.php
@@ -187,9 +187,9 @@
188188 $coordinates = str_replace( array( '´', '´' ), Maps_GEO_SEC, $coordinates );
189189 $coordinates = str_replace( array( '″', '″', Maps_GEO_SEC . Maps_GEO_SEC, '´´', '′′', '″' ), Maps_GEO_MIN, $coordinates );
190190 $coordinates = str_replace( array( '′', '′', '´', '′' ), Maps_GEO_SEC, $coordinates );
191 -
 191+
192192 $coordinates = self::removeInvalidChars( $coordinates );
193 -
 193+
194194 return $coordinates;
195195 }
196196
@@ -202,13 +202,14 @@
203203 */
204204 protected static function removeInvalidChars( $string ) {
205205 $filtered = array();
206 -
 206+
207207 foreach ( str_split( $string ) as $character ) {
208208 $asciiValue = ord( $character );
209209
210 - if ( ( $asciiValue > 31 && $asciiValue < 127 ) ) {
 210+ if ( ( $asciiValue > 31 && $asciiValue < 127 ) || $asciiValue == 194 || $asciiValue == 176 ) {
211211 $filtered[] = $character;
212212 }
 213+ else {var_dump($asciiValue);}
213214 }
214215
215216 return implode( '', $filtered );
Index: trunk/extensions/Maps/Maps.php
@@ -33,7 +33,7 @@
3434 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>.';
3535 }
3636 else {
37 - define( 'Maps_VERSION', '0.6.3 a5' );
 37+ define( 'Maps_VERSION', '0.6.3 rc1' );
3838
3939 // The different coordinate notations.
4040 define( 'Maps_COORDS_FLOAT', 'float' );

Follow-up revisions

RevisionCommit summaryAuthorDate
r68305Follow up to r68283, removed debug linejeroendedauw10:49, 20 June 2010

Comments

#Comment by MaxSem (talk | contribs)   20:05, 19 June 2010

var_dump()!

#Comment by Jeroen De Dauw (talk | contribs)   10:19, 20 June 2010

I guess I shouldn't debug when being tired :)

#Comment by Nikerabbit (talk | contribs)   13:20, 20 June 2010

You shouldn't commit before reading the diff first.

Status & tagging log