2
0
forked from Wavyzz/dolibarr

added hook to the print address function

This commit is contained in:
Cédric Salvador
2013-08-05 18:06:57 +02:00
parent ebd75449dc
commit 0127ed8b33

View File

@@ -1354,10 +1354,16 @@ function dol_user_country()
*/ */
function dol_print_address($address, $htmlid, $mode, $id) function dol_print_address($address, $htmlid, $mode, $id)
{ {
global $conf,$user,$langs; global $conf, $user, $langs, $hookmanager;
if ($address) if ($address)
{ {
if ($hookmanager) {
$parameters = array('element' => $mode, 'id' => $id);
$reshook = $hookmanager->executeHooks('printAddress', $parameters, $address, $action);
print $hookmanager->resPrint;
}
if (empty($reshook)) {
print nl2br($address); print nl2br($address);
$showgmap=$showomap=0; $showgmap=$showomap=0;
if ($mode=='thirdparty' && ! empty($conf->google->enabled) && ! empty($conf->global->GOOGLE_ENABLE_GMAPS)) $showgmap=1; if ($mode=='thirdparty' && ! empty($conf->google->enabled) && ! empty($conf->global->GOOGLE_ENABLE_GMAPS)) $showgmap=1;
@@ -1380,6 +1386,7 @@ function dol_print_address($address, $htmlid, $mode, $id)
} }
} }
} }
}
/** /**