r64893 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64892‎ | r64893 | r64894 >
Date:18:29, 10 April 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Follow up to r64891
Modified paths:
  • /trunk/extensions/Maps/Maps_CoordinateParser.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/Maps_CoordinateParser.php
@@ -20,10 +20,7 @@
2121 * @ingroup Maps
2222 *
2323 * @author Jeroen De Dauw
24 - *
25 - * TODO:
26 - * support different coordinate seperators, currently only comma's are supported.
27 - * esp spaces since these where allowed in previouse version.
 24+ *
2825 */
2926 class MapsCoordinateParser {
3027
@@ -62,6 +59,12 @@
6360 $split = explode( $seperator, $coordinates );
6461 if ( count( $split ) == 2 ) break;
6562 }
 63+
 64+ // This should not happen, as the validity of the coordinate set is already ensured by the regexes,
 65+ // but do the check anyway, and return false if it fails.
 66+ if ( count( $split ) != 2 ) {
 67+ return false;
 68+ }
6669
6770 $coordinates = array(
6871 'lat' => trim ( $split[0] ),

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r64891Changes for 0.6 - added support for multiple seperatorsjeroendedauw18:20, 10 April 2010

Status & tagging log