]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
Avoid bad cells if geo ip country does not exists.
authoreldy <>
Sun, 1 May 2005 03:37:59 +0000 (03:37 +0000)
committereldy <>
Sun, 1 May 2005 03:37:59 +0000 (03:37 +0000)
wwwroot/cgi-bin/plugins/geoip.pm

index 975513129848c66d410352917f71749a086cb0cf..08c3d22742eb1789789cacfd3128aa753e65c6c4 100644 (file)
@@ -159,7 +159,7 @@ sub ShowInfoHost_geoip {
                if ($key && $ip==4) {
                my $res=lc($gi->country_code_by_addr($param)) if $gi;
                if ($Debug) { debug("  Plugin geoip: GetCountryByIp for $param: [$res]",5); }
-                   if ($res) { print $DomainsHashIDLib{$res}?$DomainsHashIDLib{$res}:'&nbsp;'; }
+                   if ($res) { print $DomainsHashIDLib{$res}?$DomainsHashIDLib{$res}:"<span style=\"color: #$color_other\">$Message[0]</span>"; }
                    else { print "<span style=\"color: #$color_other\">$Message[0]</span>"; }
                }
                if ($key && $ip==6) {
@@ -168,7 +168,7 @@ sub ShowInfoHost_geoip {
                if (! $key) {
                my $res=lc($gi->country_code_by_name($param)) if $gi;
                if ($Debug) { debug("  Plugin geoip: GetCountryByHostname for $param: [$res]",5); }
-                   if ($res) { print $DomainsHashIDLib{$res}?$DomainsHashIDLib{$res}:'&nbsp;'; }
+                   if ($res) { print $DomainsHashIDLib{$res}?$DomainsHashIDLib{$res}:"<span style=\"color: #$color_other\">$Message[0]</span>"; }
                    else { print "<span style=\"color: #$color_other\">$Message[0]</span>"; }
                }
                print "</td>";