diff --git a/htdocs/lib/dolgeoip.class.php b/htdocs/lib/dolgeoip.class.php index 73072578699a655fa60fd65c7453530f249c732b..64f9cba797e437a2bcda5509bce71c9b4f3c994f 100644 --- a/htdocs/lib/dolgeoip.class.php +++ b/htdocs/lib/dolgeoip.class.php @@ -52,13 +52,15 @@ class DolGeoIP if (empty($type) || empty($datfile)) { - dol_syslog("DolGeoIP::DolGeoIP parameter datafile not defined", LOG_ERR); - dol_print_error('DolGeoIP constructor was called with no datafile parameter'); + //dol_syslog("DolGeoIP::DolGeoIP parameter datafile not defined", LOG_ERR); + $this->errorlabel='DolGeoIP constructor was called with no datafile parameter'; + //dol_print_error('','DolGeoIP constructor was called with no datafile parameter'); + print $this->errorlabel; return 0; } if (! file_exists($datfile)) { - dol_syslog("DolGeoIP::DolGeoIP datafile ".$datfile." can not be read", LOG_ERR); + //dol_syslog("DolGeoIP::DolGeoIP datafile ".$datfile." can not be read", LOG_ERR); $this->error='ErrorGeoIPClassNotInitialized'; $this->errorlabel="Datafile ".$datfile." not found"; print $this->errorlabel; diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index e96a36068d587f2ada0ee4d4738f71864c60c962..11f3ccc581aab07b2e5d4a6edf82f3cd2af40f5b 100644 --- a/htdocs/lib/functions.lib.php +++ b/htdocs/lib/functions.lib.php @@ -868,9 +868,8 @@ function dol_print_ip($ip) if (! empty($conf->geoipmaxmind->enabled)) { $datafile=$conf->global->GEOIPMAXMIND_COUNTRY_DATAFILE; - //$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.'/lib/dolgeoip.class.php'); $geoip=new DolGeoIP('country',$datafile);