X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=plugins%2Ffunction.display_address.php;h=28c6c4fa78f42b212ab32cfe56591c25d99ef983;hb=330ffaa012073e66a5c94a6dce3ef5c8e32f67b8;hp=07ce7c3c59c043aa3d931a060dacaa4ebd798345;hpb=730a173a333507926e0029d8a96c3a26b55756e4;p=platal.git
diff --git a/plugins/function.display_address.php b/plugins/function.display_address.php
index 07ce7c3..28c6c4f 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 ($param['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 .= "