Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jan 23, 2025
1 parent fbe9d4f commit fdfb814
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions htdocs/google/core/boxes/box_googlemaps.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ class box_googlemaps extends ModeleBoxes
*/
function __construct($db, $param = '')
{
global $conf, $user, $langs;
global $user, $langs;

$this->db = $db;

$langs->load("google@google");
$this->boxlabel=$langs->trans("ListOfMaps");

// disable module for such cases
$listofmodulesforexternal=explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL);
$listofmodulesforexternal=explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL'));
if (! in_array('adherent', $listofmodulesforexternal) && ! in_array('societe', $listofmodulesforexternal) && ! empty($user->societe_id)) $this->enabled=0; // disabled for external users
}

Expand All @@ -70,7 +70,7 @@ function __construct($db, $param = '')
*/
function loadBox($max = 5)
{
global $user, $langs, $db, $conf;
global $user, $langs;
$langs->load("boxes");
$langs->load("google@google");

Expand All @@ -79,7 +79,7 @@ function loadBox($max = 5)
$this->info_box_head = array('text' => $langs->trans("BoxMaps", $max));

$i=0;
if (isModEnabled('societe') && $user->hasRight('societe', 'lire') && ! empty($conf->global->GOOGLE_ENABLE_GMAPS) && empty($conf->global->CABINETMED_HIDETHIRPARTIESMENU)) {
if (isModEnabled('societe') && $user->hasRight('societe', 'lire') && getDolGlobalString('GOOGLE_ENABLE_GMAPS') && getDolGlobalString('CABINETMED_HIDETHIRPARTIESMENU')) {
$something++;

$url=dol_buildpath("/google/gmaps_all.php", 1)."?mode=thirdparty";
Expand All @@ -94,7 +94,7 @@ function loadBox($max = 5)

$i++;
}
if (isModEnabled('societe') && $user->hasRight('societe', 'lire') && ! empty($conf->global->GOOGLE_ENABLE_GMAPS_CONTACTS)) {
if (isModEnabled('societe') && $user->hasRight('societe', 'lire') && getDolGlobalString('GOOGLE_ENABLE_GMAPS_CONTACTS')) {
$something++;

$url=dol_buildpath("/google/gmaps_all.php", 1)."?mode=contact";
Expand All @@ -109,7 +109,7 @@ function loadBox($max = 5)

$i++;
}
if (isModEnabled('adherent') && $user->hasRight('adherent', 'lire') && ! empty($conf->global->GOOGLE_ENABLE_GMAPS_MEMBERS)) {
if (isModEnabled('adherent') && $user->hasRight('adherent', 'lire') && getDolGlobalString('GOOGLE_ENABLE_GMAPS_MEMBERS')) {
$something++;

$url=dol_buildpath("/google/gmaps_all.php", 1)."?mode=member";
Expand Down

0 comments on commit fdfb814

Please sign in to comment.