From: Christopher Lambacher Date: Mon, 17 Feb 2020 00:54:06 +0000 (-0500) Subject: More geoip2 fixes X-Git-Tag: AWSTATS_7_8~3^2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c74ebed28e5ea00851d96b39f700b3b2fbe1b1ab;p=thirdparty%2FAWStats.git More geoip2 fixes --- diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl index c7f65729..30cbbd0a 100755 --- a/wwwroot/cgi-bin/awstats.pl +++ b/wwwroot/cgi-bin/awstats.pl @@ -3314,7 +3314,7 @@ sub Read_Plugins { if ( $PluginsLoaded{'init'}{'geoip'} || $PluginsLoaded{'init'}{'geoip6'} || $PluginsLoaded{'init'}{'geoipfree'} - || $PluginsLoaded{'init'}{'geoip2'}) + || $PluginsLoaded{'init'}{'geoip2_country'}) { $Message[17] = $Message[25] = $Message[148]; } @@ -19435,8 +19435,8 @@ if ( $UpdateStats && $FrameName ne 'index' && $FrameName ne 'mainleft' ) elsif ( $PluginsLoaded{'GetCountryCodeByAddr'}{'geoipfree'} ) { $Domain = GetCountryCodeByAddr_geoipfree($HostResolved); } - elsif ( $PluginsLoaded{'GetCountryCodeByAddr'}{'geoip2'} ) { - $Domain = GetCountryCodeByAddr_geoip2($HostResolved); + elsif ( $PluginsLoaded{'GetCountryCodeByAddr'}{'geoip2_country'} ) { + $Domain = GetCountryCodeByAddr_geoip2_country($HostResolved); } if ($AtLeastOneSectionPlugin) { foreach my $pluginname ( @@ -19473,9 +19473,9 @@ if ( $UpdateStats && $FrameName ne 'index' && $FrameName ne 'mainleft' ) $Domain = GetCountryCodeByAddr_geoipfree($Host); } elsif ( - $PluginsLoaded{'GetCountryCodeByAddr'}{'geoip2'} ) + $PluginsLoaded{'GetCountryCodeByAddr'}{'geoip2_country'} ) { - $Domain = GetCountryCodeByAddr_geoip2($Host); + $Domain = GetCountryCodeByAddr_geoip2_country($Host); } elsif ( $HostResolved =~ /\.(\w+)$/ ) { $Domain = $1; } if ($AtLeastOneSectionPlugin) { @@ -19507,9 +19507,9 @@ if ( $UpdateStats && $FrameName ne 'index' && $FrameName ne 'mainleft' ) $Domain = GetCountryCodeByName_geoipfree($HostResolved); } elsif ( - $PluginsLoaded{'GetCountryCodeByName'}{'geoip2'} ) + $PluginsLoaded{'GetCountryCodeByName'}{'geoip2_country'} ) { - $Domain = GetCountryCodeByName_geoip2($HostResolved); + $Domain = GetCountryCodeByName_geoip2_country($HostResolved); } elsif ( $HostResolved =~ /\.(\w+)$/ ) { $Domain = $1; } if ($AtLeastOneSectionPlugin) { diff --git a/wwwroot/cgi-bin/plugins/geoip2_country.pm b/wwwroot/cgi-bin/plugins/geoip2_country.pm index 85f0e29b..b7f7533f 100644 --- a/wwwroot/cgi-bin/plugins/geoip2_country.pm +++ b/wwwroot/cgi-bin/plugins/geoip2_country.pm @@ -142,6 +142,7 @@ sub ShowInfoHost_geoip2_country { print ""; } elsif ($param) { + print ""; my $res = Lookup_geoip2_country($param); if ($res) { $res = lc($res);