From: Laurent Destailleur Date: Sat, 7 Dec 2013 22:44:33 +0000 (+0100) Subject: Fix: #838 GeoIP Cities page doesnt work from awstats 7.0 X-Git-Tag: AWSTATS_7_3~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bf94e5785f256fa08b431a9ff366e2be701f2bce;p=thirdparty%2FAWStats.git Fix: #838 GeoIP Cities page doesnt work from awstats 7.0 --- diff --git a/wwwroot/cgi-bin/plugins/geoip_city_maxmind.pm b/wwwroot/cgi-bin/plugins/geoip_city_maxmind.pm index 3fcec06c..1710e08a 100755 --- a/wwwroot/cgi-bin/plugins/geoip_city_maxmind.pm +++ b/wwwroot/cgi-bin/plugins/geoip_city_maxmind.pm @@ -4710,11 +4710,12 @@ sub SectionProcessIp_geoip_city_maxmind { } if ($Debug) { debug(" Plugin $PluginName: GetCityByIp for $param: [$record]",5); } if ($record) { + my $city=$record->city; # if ($PageBool) { $_city_p{$city}++; } if ($city) { my $countrycity=$record->country_code.'_'.$record->city; $countrycity=~s/ /%20/g; - if ($region) { $countrycity.='_'.$record->region; } + if ($record->region) { $countrycity.='_'.$record->region; } $_city_h{lc($countrycity)}++; } else { $_city_h{'unknown'}++;