X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=plugins%2Ffunction.display_address.php;h=28c6c4fa78f42b212ab32cfe56591c25d99ef983;hb=0073747ac81cc9cff9e43847eb008f0e815255f0;hp=7114a2b4af4abfd213deabb3d135429a4eadb814;hpb=b032b01b8919b36ec66f8a0395132953d8c01cf2;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'] . "'" : '';