2
0
forked from Wavyzz/dolibarr

QUAL All $conf->global->module->enabled are replaced with isModEnabled()

This commit is contained in:
Laurent Destailleur
2024-10-07 14:40:29 +02:00
parent 9b378d74af
commit 58cc96cd33
18 changed files with 36 additions and 25 deletions

View File

@@ -4520,7 +4520,7 @@ function dolGetCountryCodeFromIp($ip)
$countrycode = '';
if (!empty($conf->geoipmaxmind->enabled)) {
if (isModEnabled('geoipmaxmind')) {
$datafile = getDolGlobalString('GEOIPMAXMIND_COUNTRY_DATAFILE');
//$ip='24.24.24.24';
//$datafile='/usr/share/GeoIP/GeoIP.dat'; Note that this must be downloaded datafile (not same than datafile provided with ubuntu packages)
@@ -4546,7 +4546,7 @@ function dol_user_country()
//$ret=$user->xxx;
$ret = '';
if (!empty($conf->geoipmaxmind->enabled)) {
if (isModEnabled('geoipmaxmind')) {
$ip = getUserRemoteIP();
$datafile = getDolGlobalString('GEOIPMAXMIND_COUNTRY_DATAFILE');
//$ip='24.24.24.24';