]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
Fix: #838 GeoIP Cities page doesnt work from awstats 7.0
authorLaurent Destailleur <eldy@destailleur.fr>
Sat, 7 Dec 2013 22:44:33 +0000 (23:44 +0100)
committerLaurent Destailleur <eldy@destailleur.fr>
Sat, 7 Dec 2013 22:44:33 +0000 (23:44 +0100)
wwwroot/cgi-bin/plugins/geoip_city_maxmind.pm

index 3fcec06c627cdecb274fda06f4561b7a3a8157a9..1710e08a98e1da7808a33a912beaa7fa51b1a487 100755 (executable)
@@ -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'}++;