Skip to content
Snippets Groups Projects
Commit bd8cbd2f authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

First change for future geoip module.

parent d85cdc81
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment