From: eldy <>
Date: Sat, 29 Nov 2008 18:10:00 +0000 (+0000)
Subject: Fix: Error with xml output
X-Git-Tag: AWSTATS_6_9~11
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=afa5be8f0947ef99f4875fe8757a0fcc30a251ea;p=thirdparty%2FAWStats.git
Fix: Error with xml output
---
diff --git a/wwwroot/cgi-bin/plugins/geoip_city_maxmind.pm b/wwwroot/cgi-bin/plugins/geoip_city_maxmind.pm
index cf304aa1..ed1c7508 100755
--- a/wwwroot/cgi-bin/plugins/geoip_city_maxmind.pm
+++ b/wwwroot/cgi-bin/plugins/geoip_city_maxmind.pm
@@ -2240,26 +2240,26 @@ my %regall=(
"LV_02","Aluksnes",
"LV_03","Balvu",
"LV_04","Bauskas",
-"LV_05","Cïsu",
+"LV_05","C�su",
"LV_06","Daugavpils",
"LV_07","Daugavpils",
"LV_08","Dobeles",
"LV_09","Gulbenes",
-"LV_10","Jïkabpils",
+"LV_10","Jekabpils",
"LV_11","Jelgava",
"LV_12","Jelgavas",
"LV_13","Jurmala",
-"LV_14","Krïlavas",
+"LV_14","Krelavas",
"LV_15","Kuldigas",
-"LV_16","Liepïja",
-"LV_17","Liepïjas",
+"LV_16","Liepeja",
+"LV_17","Liepejas",
"LV_18","Limbazu",
"LV_19","Ludzas",
"LV_20","Madonas",
"LV_21","Ogres",
"LV_22","Preilu",
-"LV_23","Rïzekne",
-"LV_24","Rïzeknes",
+"LV_23","Rezekne",
+"LV_24","Rezeknes",
"LV_25","Riga",
"LV_26","Rigas",
"LV_27","Saldus",
@@ -4389,7 +4389,7 @@ sub AddHTMLGraph_geoip_city_maxmind {
print "
".$DomainsHashIDLib{$countrycode}." | ";
my $regionlib=RegionName($countrycode, $regioncode);
print "".($regionlib?$regionlib:' ')." | ";
- print "".ucfirst($city)." | ";
+ print "".ucfirst(EncodeToPageCode($city))." | ";
if ($ShowCities =~ /P/i) { print "".($_city_p{$key}?$_city_p{$key}:" ")." | "; }
if ($ShowCities =~ /P/i) { print "".($_city_p{$key}?"$p_p %":' ')." | "; }
if ($ShowCities =~ /H/i) { print "".($_city_h{$key}?$_city_h{$key}:" ")." | "; }
@@ -4590,7 +4590,7 @@ sub ShowInfoHost_geoip_city_maxmind {
# else { print "$Message[0]"; }
# print "";
print "";
- if ($city) { print "$city"; }
+ if ($city) { print EncodeToPageCode($city); }
else { print "$Message[0]"; }
print " | ";
}
@@ -4626,7 +4626,7 @@ sub ShowInfoHost_geoip_city_maxmind {
# else { print "$Message[0]"; }
# print "";
print "";
- if ($city) { print "$city"; }
+ if ($city) { print EncodeToPageCode($city); }
else { print "$Message[0]"; }
print " | ";
}
@@ -4811,14 +4811,14 @@ sub SectionWriteHistory_geoip_city_maxmind {
#my $page=$_city_p{$_}||0;
#my $bytes=$_city_k{$_}||0;
#my $lastaccess=$_city_l{$_}||'';
- print HISTORYTMP "${xmlrb}$_${xmlrs}0${xmlrs}", $_city_h{$_}, "${xmlrs}0${xmlrs}0${xmlre}\n"; next;
+ print HISTORYTMP "${xmlrb}".XMLEncodeForHisto($_)."${xmlrs}0${xmlrs}", $_city_h{$_}, "${xmlrs}0${xmlrs}0${xmlre}\n"; next;
}
foreach (keys %_city_h) {
if ($keysinkeylist{$_}) { next; }
#my $page=$_city_p{$_}||0;
#my $bytes=$_city_k{$_}||0;
#my $lastaccess=$_city_l{$_}||'';
- print HISTORYTMP "${xmlrb}$_${xmlrs}0${xmlrs}", $_city_h{$_}, "${xmlrs}0${xmlrs}0${xmlre}\n"; next;
+ print HISTORYTMP "${xmlrb}".XMLEncodeForHisto($_)."${xmlrs}0${xmlrs}", $_city_h{$_}, "${xmlrs}0${xmlrs}0${xmlre}\n"; next;
}
print HISTORYTMP "${xmleb}END_PLUGIN_geoip_city_maxmind${xmlee}\n";
# ----->