X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=plugins%2Ffunction.display_address.php;h=32cf19c036124fecd4777bbdb4afd7849cd5cf25;hb=f6e35ff3fefafe908e1675690340ab93265192a0;hp=07ce7c3c59c043aa3d931a060dacaa4ebd798345;hpb=ebd515f95f03f8a87f9b846d65e179b39a535222;p=platal.git
diff --git a/plugins/function.display_address.php b/plugins/function.display_address.php
index 07ce7c3..32cf19c 100644
--- a/plugins/function.display_address.php
+++ b/plugins/function.display_address.php
@@ -1,6 +1,6 @@
text;
+ if (!$txtad && !$adr->phones() && !count($adr->phones())) {
+ return "";
+ }
$lines = explode("\n", $txtad);
$idt = array_shift($lines);
@@ -61,29 +59,37 @@ function smarty_function_display_address($param, &$smarty)
$map = "";
+ $comment = "";
+ if ($adr->comment != "")
+ {
+ $commentHtml = str_replace(array('&', '"'), array('&', '"'), $adr->comment);
+ $commentJs = str_replace(array('\\', '\''), array('\\\\', '\\\''), $commentHtml);
+ $comment = "
";
+ }
if ($restore) {
array_unshift($lines, $idt);
}
if ($param['titre'])
{
if ($param['titre_div'])
- $txthtml .= "