forked from Wavyzz/dolibarr
added hook to the print address function
This commit is contained in:
@@ -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)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user