PHP8
This commit is contained in:
parent
7ff9c86817
commit
587f794fdf
@ -3502,7 +3502,7 @@ function dolGetCountryCodeFromIp($ip)
|
|||||||
$countrycode = '';
|
$countrycode = '';
|
||||||
|
|
||||||
if (!empty($conf->geoipmaxmind->enabled)) {
|
if (!empty($conf->geoipmaxmind->enabled)) {
|
||||||
$datafile = $conf->global->GEOIPMAXMIND_COUNTRY_DATAFILE;
|
$datafile = getDolGlobalString('GEOIPMAXMIND_COUNTRY_DATAFILE');
|
||||||
//$ip='24.24.24.24';
|
//$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)
|
//$datafile='/usr/share/GeoIP/GeoIP.dat'; Note that this must be downloaded datafile (not same than datafile provided with ubuntu packages)
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgeoip.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgeoip.class.php';
|
||||||
@ -3529,7 +3529,7 @@ function dol_user_country()
|
|||||||
$ret = '';
|
$ret = '';
|
||||||
if (!empty($conf->geoipmaxmind->enabled)) {
|
if (!empty($conf->geoipmaxmind->enabled)) {
|
||||||
$ip = getUserRemoteIP();
|
$ip = getUserRemoteIP();
|
||||||
$datafile = $conf->global->GEOIPMAXMIND_COUNTRY_DATAFILE;
|
$datafile = getDolGlobalString('GEOIPMAXMIND_COUNTRY_DATAFILE');
|
||||||
//$ip='24.24.24.24';
|
//$ip='24.24.24.24';
|
||||||
//$datafile='E:\Mes Sites\Web\Admin1\awstats\maxmind\GeoIP.dat';
|
//$datafile='E:\Mes Sites\Web\Admin1\awstats\maxmind\GeoIP.dat';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgeoip.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgeoip.class.php';
|
||||||
|
|||||||
@ -294,8 +294,9 @@ $suburi = strstr($uri, '/'); // $suburi contains url without domain:port
|
|||||||
if ($suburi == '/') {
|
if ($suburi == '/') {
|
||||||
$suburi = ''; // If $suburi is /, it is now ''
|
$suburi = ''; // If $suburi is /, it is now ''
|
||||||
}
|
}
|
||||||
|
if (!defined('DOL_URL_ROOT')) {
|
||||||
define('DOL_URL_ROOT', $suburi); // URL relative root ('', '/dolibarr', ...)
|
define('DOL_URL_ROOT', $suburi); // URL relative root ('', '/dolibarr', ...)
|
||||||
|
}
|
||||||
//print DOL_MAIN_URL_ROOT.'-'.DOL_URL_ROOT."\n";
|
//print DOL_MAIN_URL_ROOT.'-'.DOL_URL_ROOT."\n";
|
||||||
|
|
||||||
// Define prefix MAIN_DB_PREFIX
|
// Define prefix MAIN_DB_PREFIX
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user