forked from Wavyzz/dolibarr
use isModEnabled
This commit is contained in:
@@ -3801,22 +3801,22 @@ function dol_print_address($address, $htmlid, $element, $id, $noprint = 0, $char
|
||||
|
||||
// TODO Remove this block, we can add this using the hook now
|
||||
$showgmap = $showomap = 0;
|
||||
if (($element == 'thirdparty' || $element == 'societe') && !empty($conf->google->enabled) && !empty($conf->global->GOOGLE_ENABLE_GMAPS)) {
|
||||
if (($element == 'thirdparty' || $element == 'societe') && isModEnabled('google') && !empty($conf->global->GOOGLE_ENABLE_GMAPS)) {
|
||||
$showgmap = 1;
|
||||
}
|
||||
if ($element == 'contact' && !empty($conf->google->enabled) && !empty($conf->global->GOOGLE_ENABLE_GMAPS_CONTACTS)) {
|
||||
if ($element == 'contact' && isModEnabled('google') && !empty($conf->global->GOOGLE_ENABLE_GMAPS_CONTACTS)) {
|
||||
$showgmap = 1;
|
||||
}
|
||||
if ($element == 'member' && !empty($conf->google->enabled) && !empty($conf->global->GOOGLE_ENABLE_GMAPS_MEMBERS)) {
|
||||
if ($element == 'member' && isModEnabled('google') && !empty($conf->global->GOOGLE_ENABLE_GMAPS_MEMBERS)) {
|
||||
$showgmap = 1;
|
||||
}
|
||||
if (($element == 'thirdparty' || $element == 'societe') && !empty($conf->openstreetmap->enabled) && !empty($conf->global->OPENSTREETMAP_ENABLE_MAPS)) {
|
||||
if (($element == 'thirdparty' || $element == 'societe') && isModEnabled('openstreetmap') && !empty($conf->global->OPENSTREETMAP_ENABLE_MAPS)) {
|
||||
$showomap = 1;
|
||||
}
|
||||
if ($element == 'contact' && !empty($conf->openstreetmap->enabled) && !empty($conf->global->OPENSTREETMAP_ENABLE_MAPS_CONTACTS)) {
|
||||
if ($element == 'contact' && isModEnabled('openstreetmap') && !empty($conf->global->OPENSTREETMAP_ENABLE_MAPS_CONTACTS)) {
|
||||
$showomap = 1;
|
||||
}
|
||||
if ($element == 'member' && !empty($conf->openstreetmap->enabled) && !empty($conf->global->OPENSTREETMAP_ENABLE_MAPS_MEMBERS)) {
|
||||
if ($element == 'member' && isModEnabled('openstreetmap') && !empty($conf->global->OPENSTREETMAP_ENABLE_MAPS_MEMBERS)) {
|
||||
$showomap = 1;
|
||||
}
|
||||
if ($showgmap) {
|
||||
@@ -9779,7 +9779,7 @@ function printCommonFooter($zone = 'private')
|
||||
|
||||
// Google Analytics
|
||||
// TODO Add a hook here
|
||||
if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AN_ID)) {
|
||||
if (isModEnabled('google') && !empty($conf->global->MAIN_GOOGLE_AN_ID)) {
|
||||
$tmptagarray = explode(',', $conf->global->MAIN_GOOGLE_AN_ID);
|
||||
foreach ($tmptagarray as $tmptag) {
|
||||
print "\n";
|
||||
|
||||
Reference in New Issue
Block a user