X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=plugins%2Ffunction.display_address.php;h=28c6c4fa78f42b212ab32cfe56591c25d99ef983;hb=330ffaa012073e66a5c94a6dce3ef5c8e32f67b8;hp=c69958924e52d22817f78b3f86586ff1a0d8558c;hpb=2504be33ed7e7436c428f188bdafa9e72248131d;p=platal.git diff --git a/plugins/function.display_address.php b/plugins/function.display_address.php index c699589..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 = "
\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'] . "'" : '';