X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=plugins%2Ffunction.display_address.php;h=32cf19c036124fecd4777bbdb4afd7849cd5cf25;hb=f6e35ff3fefafe908e1675690340ab93265192a0;hp=66cb09c12914b76416e3362c41278965d5033536;hpb=25fe4c85de79aa601948d788b5754b5b6070080d;p=platal.git
diff --git a/plugins/function.display_address.php b/plugins/function.display_address.php
index 66cb09c..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 .= "