X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=inline;f=plugins%2Ffunction.display_address.php;h=28c6c4fa78f42b212ab32cfe56591c25d99ef983;hb=330ffaa012073e66a5c94a6dce3ef5c8e32f67b8;hp=7114a2b4af4abfd213deabb3d135429a4eadb814;hpb=3f5cf357e7ab02c9cbf616bc8cc3a70278af62cc;p=platal.git
diff --git a/plugins/function.display_address.php b/plugins/function.display_address.php
index 7114a2b..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 "";
}
@@ -61,7 +62,7 @@ function smarty_function_display_address($param, &$smarty)
$comment = "";
if ($param['adr']['comment'] != "")
{
- $commentHtml = str_replace(array('&', '"'), array('&', '"'), $param['adr']['comment']);
+ $commentHtml = str_replace(array('&', '"'), array('&', '"'), $adr->comment);
$commentJs = str_replace(array('\\', '\''), array('\\\\', '\\\''), $commentHtml);
$comment = "![](\"images/icons/comments.gif\"")
\n";
}
- if(isset($param['adr']['tels'])) {
+ if($adr->phones() != null) {
require_once('function.display_phones.php');
- $txthtml .= smarty_function_display_phones($param['adr'],$smarty);
+ $txthtml .= smarty_function_display_phones(array('tels' => $adr->phones()),$smarty);
}
if (!$param['nodiv']) {
$pos = $param['pos'] ? " style='float: " . $param['pos'] . "'" : '';