Backport
authorx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Wed, 27 Sep 2006 21:58:22 +0000 (21:58 +0000)
committerx2003bruneau <x2003bruneau@839d8a87-29fc-0310-9880-83ba4fa771e5>
Wed, 27 Sep 2006 21:58:22 +0000 (21:58 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@927 839d8a87-29fc-0310-9880-83ba4fa771e5

ChangeLog
plugins/function.display_address.php

index 422fcb5..0edfa2f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -18,6 +18,9 @@ Bug/Wish:
 
 From 0.9.11 branch:
 
+    * Geoloc:
+        - #469: Google Maps link works for the USA                         -FRU
+
     * Payment:
         - #482: fix action in the form.                                     -MC
 
index 4cf3154..e740d51 100644 (file)
@@ -29,9 +29,9 @@ function smarty_function_display_address($param, &$smarty) {
         !$param['adr']['fax'] &&
         !$param['adr']['mobile']) return "";
 
-    $lines = explode("\n",$txtad);
+    $lines = explode("\n", $txtad);
     $txthtml = "";
-    $map = "<a href=\"http://maps.google.fr/?q=".urlencode(implode(", ", $lines))."\"><img src=\"images/icons/map.gif\" title=\"Carte\"/></a>";
+    $map = "<a href=\"http://maps.google.fr/?q=".urlencode(str_replace('États-Unis d\'Amérique', 'USA', implode(", ", $lines)))."\"><img src=\"images/icons/map.gif\" title=\"Carte\"/></a>";
     if ($param['titre'])
     {
         if ($param['titre_div'])