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

index a992dadacc0f91003c7f24c20505e0eb1be0031f..975513129848c66d410352917f71749a086cb0cf 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}; }
+                   if ($res) { print $DomainsHashIDLib{$res}?$DomainsHashIDLib{$res}:'&nbsp;'; }
                    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}; }
+                   if ($res) { print $DomainsHashIDLib{$res}?$DomainsHashIDLib{$res}:'&nbsp;'; }
                    else { print "<span style=\"color: #$color_other\">$Message[0]</span>"; }
                }
                print "</td>";