r59094 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59093‎ | r59094 | r59095 >
Date:12:15, 15 November 2009
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Modified paths:
  • /trunk/extensions/Maps/Geocoders/Maps_GeocodeUtils.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/Geocoders/Maps_GeocodeUtils.php
@@ -50,11 +50,11 @@
5151 */
5252 public static function isCoordinate($coordsOrAddress) {
5353 $coordRegexes = array(
54 - '/^(-)?\d{1,3}(\.\d{1,14})?,(\s)?(-)?\d{1,3}(\.\d{1,14})?$/', // Floats
 54+ '/^(-)?\d{1,3}(\.\d{1,20})?,(\s)?(-)?\d{1,3}(\.\d{1,20})?$/', // Floats
5555 '/^(\d{1,3}°)(\d{1,2}(\′|\'))?((\d{1,2}(″|"))?|(\d{1,2}\.\d{1,2}(″|"))?)(N|S)(\s)?(\d{1,3}°)(\d{1,2}(\′|\'))?((\d{1,2}(″|"))?|(\d{1,2}\.\d{1,2}(″|"))?)(E|W)$/', // DMS
56 - '/^(-)?\d{1,3}(|\.\d{1,14})°,(\s)?(-)?(\s)?\d{1,3}(|\.\d{1,14})°$/', // DD
57 - '/^\d{1,3}(|\.\d{1,14})°(\s)?(N|S),(\s)?(\s)?\d{1,3}(|\.\d{1,14})°(\s)(E|W)?$/', // DD (directional)
58 - '/(-)?\d{1,3}°\d{1,3}(\.\d{1,14}\')?,(\s)?(-)?\d{1,3}°\d{1,3}(\.\d{1,14}\')?$/', // DM
 56+ '/^(-)?\d{1,3}(|\.\d{1,20})°,(\s)?(-)?(\s)?\d{1,3}(|\.\d{1,20})°$/', // DD
 57+ '/^\d{1,3}(|\.\d{1,20})°(\s)?(N|S),(\s)?(\s)?\d{1,3}(|\.\d{1,20})°(\s)(E|W)?$/', // DD (directional)
 58+ '/(-)?\d{1,3}°\d{1,3}(\.\d{1,20}\')?,(\s)?(-)?\d{1,3}°\d{1,3}(\.\d{1,20}\')?$/', // DM
5959 );
6060
6161 $isCoordinate = false;

Status & tagging log