From bd8cbd2f44af40409c41291785355d236ce1d011 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@users.sourceforge.net> Date: Tue, 13 Oct 2009 22:10:06 +0000 Subject: [PATCH] First change for future geoip module. --- htdocs/lib/dolgeoip.class.php | 8 +++++--- htdocs/lib/functions.lib.php | 3 +-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/lib/dolgeoip.class.php b/htdocs/lib/dolgeoip.class.php index 73072578699..64f9cba797e 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 e96a36068d5..11f3ccc581a 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); -- GitLab