From c681e200e5783261fc7d179cc46161019e852c4f Mon Sep 17 00:00:00 2001 From: Pascal Corpet Date: Mon, 13 Jun 2005 09:34:28 +0000 Subject: [PATCH] fix bug IE geoloc git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-712 --- include/geoloc.inc.php | 7 +++---- templates/geoloc/form.address.tpl | 17 +++++++---------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/include/geoloc.inc.php b/include/geoloc.inc.php index 216d786..9892c9f 100644 --- a/include/geoloc.inc.php +++ b/include/geoloc.inc.php @@ -111,8 +111,8 @@ function get_address_text($adr) { // compares if two address matches // $b should be a complete valid address function compare_addresses_text($a, $b) { - $ta = strtoupper(preg_replace(array("/[,\"'#~:;_\-]/", "/\r\n/"), array(" ", "\n"), $a)); - $tb = strtoupper(preg_replace(array("/[,\"'#~:;_\-]/", "/\r\n/"), array(" ", "\n"), $b)); + $ta = strtoupper(preg_replace(array("/[0-9,\"'#~:;_\- ]/", "/\r\n/"), array("", "\n"), $a)); + $tb = strtoupper(preg_replace(array("/[0-9,\"'#~:;_\- ]/", "/\r\n/"), array("", "\n"), $b)); $la = explode("\n", $ta); $lb = explode("\n", $tb); @@ -162,13 +162,12 @@ function localize_addresses($uid) { $new['region'], $new['country'], $uid, $a['adrid']); $new['store'] = true; - if (!$new['cityid']) return $erreur[$a['adrid']] = $new; + if (!$new['cityid']) $erreur[$a['adrid']] = $new; } else { $new['store'] = false; $erreur[$a['adrid']] = $new; } } - return $erreur; } diff --git a/templates/geoloc/form.address.tpl b/templates/geoloc/form.address.tpl index 6ede47b..b59508f 100644 --- a/templates/geoloc/form.address.tpl +++ b/templates/geoloc/form.address.tpl @@ -2,25 +2,22 @@ - La geolocalisation n'a pas donné un résultat certain, vérifie la nouvelle adresse ou modifie l'ancienne pour que ton adresse puisse être prise en compte. -
- -
-
-
{$adr.geoloc}
+ [Valider] -
{else} - -- 2.1.4