]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
More geoip2 fixes 152/head
authorChristopher Lambacher <chris@kateandchris.net>
Mon, 17 Feb 2020 00:54:06 +0000 (19:54 -0500)
committerChristopher Lambacher <chris@kateandchris.net>
Mon, 17 Feb 2020 00:54:06 +0000 (19:54 -0500)
wwwroot/cgi-bin/awstats.pl
wwwroot/cgi-bin/plugins/geoip2_country.pm

index c7f657290be29bfa2d2fb68c785778743f081649..30cbbd0aa89d2d873d102dcac84c1b3f0a02775c 100755 (executable)
@@ -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) {
index 85f0e29b1baf99ed211e2d5bb9368f62c71da91b..b7f7533f0fc8a046ef2d5acd376a1cefef585a65 100644 (file)
@@ -142,6 +142,7 @@ sub ShowInfoHost_geoip2_country {
         print "</th>";
        }
        elsif ($param) {
+        print "<td>";
                my $res = Lookup_geoip2_country($param);
                if ($res) {
                                $res = lc($res);