From: Stefan Schantl Date: Fri, 12 Jun 2020 15:59:43 +0000 (+0200) Subject: dns.cgi: Use location-functions.pl X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4346cb66607da5f94628364f16ecfe2218671c2c;p=people%2Fstevee%2Fipfire-2.x.git dns.cgi: Use location-functions.pl Signed-off-by: Stefan Schantl --- diff --git a/html/cgi-bin/dns.cgi b/html/cgi-bin/dns.cgi index 676d95f8a6..0a097e2c05 100755 --- a/html/cgi-bin/dns.cgi +++ b/html/cgi-bin/dns.cgi @@ -27,7 +27,7 @@ use IO::Socket; #use CGI::Carp 'fatalsToBrowser'; require '/var/ipfire/general-functions.pl'; -require "${General::swroot}/geoip-functions.pl"; +require "${General::swroot}/location-functions.pl"; require "${General::swroot}/ids-functions.pl"; require "${General::swroot}/lang.pl"; require "${General::swroot}/header.pl"; @@ -269,6 +269,9 @@ my %dns_servers = (); # Read-in config file. &General::readhasharray("$servers_file", \%dns_servers); +# Libloc database handle +my $libloc_db_handle = &Location::Functions::init(); + &Header::openpage($Lang::tr{'dns'}, 1, ''); &Header::openbigbox('100%', 'left', '', $errormessage); @@ -594,9 +597,9 @@ END $status_colour = ${Header::colourred}; } - # collect more information about name server (rDNS, GeoIP country code) - my $ccode = &GeoIP::lookup($nameserver); - my $flag_icon = &GeoIP::get_flag_icon($ccode); + # collect more information about name server (rDNS, country code) + my $ccode = &Location::Functions::lookup_country_code($libloc_db_handle, $nameserver); + my $flag_icon = &Location::Functions::get_flag_icon($ccode); my $rdns;