Sprout from master 2008-11-15 16:20:53 UTC eldy 'Fix: Full list of extrasections was not ordered correctly'
Cherrypick from master 2008-11-30 16:02:44 UTC eldy 'Add ax and rs domains':
README.TXT
make/makepack-howto.txt
wwwroot/cgi-bin/awstats.pl
wwwroot/cgi-bin/lib/domains.pm
wwwroot/cgi-bin/plugins/geoip_city_maxmind.pm
License: GNU GPL (GNU General Public License. See LICENSE file),
OSI Certified Open Source Software license.
Version: 6.9
-Release date: August 2008
+Release date: November 2008
Platforms: All (Linux, NT, BSD, Solaris and other *NIX's, BeOS, OS/2...)
Author: Laurent Destailleur <eldy@users.sourceforge.net>
AWStats official web site and latest version: http://awstats.sourceforge.net
* Your server must log web access in a log file you can read.
* To run awstats, from command line, your operating system must be able
to run perl scripts (.pl files).
+ * Perl module "Encode" must be available.
To run awstats as a CGI (for real-time
statistics), your web server must also be able to run such scripts.
-***** Actions to do to release *****\r
-- Check all files are commited.\r
-- Update file README.txt\r
-- Update version number in doc files\r
-- Update version number in makepack files\r
-- Update version number and copyright year in awstats.pl file\r
-- Build PAD files\r
-- Build PDF\r
-- Tagger CVS\r
+***** Actions to build a beta or release *****
+- Check all files are commited.
+- Update file README.txt
+- Update version number in doc files
+- Update version number in makepack files
+- Update version number and copyright year in awstats.pl file
+- Build PAD files
+- Build PDF
+- Tagger CVS (AWSTATS_x_x_BETA or AWSTATS_x_x)
-- makepack sur webmin\r
-- makepack sur awstats (If on linux copy awstats_logo1.gif into $RPMDIR/SOURCES)\r
-- Check content of built packages.\r
-- Move build files into "files" directory\r
-- Update web site page index.php\r
-- Upload files and web site on web server\r
-- Upload files on sourceforge\r
-- Send mail on mailing-list\r
+- makepack sur webmin
+- makepack sur awstats (If on linux copy awstats_logo1.gif into $RPMDIR/SOURCES)
+- Check content of built packages.
+- Move build files into "files" directory
+- Update web site page index.php
+- Upload files and web site on web server
+- Upload files on sourceforge (release only)
+- Send mail on mailing-list
no strict "refs";
use Time::Local; # use Time::Local 'timelocal_nocheck' is faster but not supported by all Time::Local modules
use Socket;
+use Encode;
#------------------------------------------------------------------------------
# Defines
}
next;
}
- if ( $field[0] eq 'LastUpdate'
- || $field[0] eq "${xmlrb}LastUpdate" )
+ if ($field[0] eq 'LastUpdate'
+ || $field[0] eq "${xmlrb}LastUpdate")
{
- if ( $LastUpdate < $field[1] ) {
- $LastUpdate = int( $field[1] );
-
- #$LastUpdateLinesRead=int($field[2]);
- #$LastUpdateNewLinesRead=int($field[3]);
- #$LastUpdateLinesCorrupted=int($field[4]);
- }
+ if (! $LastUpdate) { $LastUpdate=int($field[1]); };
next;
}
if ( $field[0] eq 'TotalVisits'
}
# General
- if ( $sectiontosave eq 'general' ) {
- if ( $LastUpdate <
- int("$nowyear$nowmonth$nowday$nowhour$nowmin$nowsec") )
- {
- $LastUpdate = int("$nowyear$nowmonth$nowday$nowhour$nowmin$nowsec");
- }
+ if ($sectiontosave eq 'general') {
+ $LastUpdate=int("$nowyear$nowmonth$nowday$nowhour$nowmin$nowsec");
print HISTORYTMP "\n";
if ($xml) {
print HISTORYTMP "<section id='$sectiontosave'><comment>\n";
#------------------------------------------------------------------------------
# Function: Transforms spaces into %20 and special chars by HTML entities as needed in XML/XHTML
-# Decoding is done by XMLDecodeFromHisto
+# Decoding is done by XMLDecodeFromHisto.
+# AWStats data files are stored in ISO-8859-1.
# Parameters: stringtoencode
# Return: encodedstring
#------------------------------------------------------------------------------
return $string;
}
+#------------------------------------------------------------------------------
+# Function: Encode an ISO string to PageCode output
+# Parameters: stringtoencode
+# Return: encodedstring
+#------------------------------------------------------------------------------
+sub EncodeToPageCode {
+ my $string = shift;
+ if ($PageCode eq 'utf-8') { $string=encode("utf8", $string); }
+ return $string;
+}
+
#------------------------------------------------------------------------------
# Function: Encode a binary string into an ASCII string
# Parameters: stringtoencode
#------------------------------------------------------------------------------
# Function: Clean tags in a string
+# AWStats data files are stored in ISO-8859-1.
# Parameters: stringtodecode
# Input: None
# Output: None
'am','Armenia','an','Netherlands Antilles','ao','Angola',
'aq','Antarctica','ar','Argentina','arpa','Old style Arpanet',
'as','American Samoa','at','Austria','au','Australia','aw','Aruba',
+'ax','Aland islands',
'az','Azerbaidjan','ba','Bosnia-Herzegovina','bb','Barbados',
'bd','Bangladesh','be','Belgium','bf','Burkina Faso','bg','Bulgaria',
'bh','Bahrain','bi','Burundi','biz','Biz domains','bj','Benin','bm','Bermuda',
'pg','Papua New Guinea','ph','Philippines','pk','Pakistan','pl','Poland',
'pm','Saint Pierre and Miquelon','pn','Pitcairn Island','pr','Puerto Rico','pro','Professional domains',
'ps','Palestinian Territories','pt','Portugal','pw','Palau','py','Paraguay','qa','Qatar',
-'re','Reunion (French)','ro','Romania','ru','Russian Federation','rw','Rwanda',
+'re','Reunion (French)','ro','Romania',
+'rs','Republic of Serbia',
+'ru','Russian Federation','rw','Rwanda',
'sa','Saudi Arabia','sb','Solomon Islands','sc','Seychelles',
'sd','Sudan','se','Sweden','sg','Singapore','sh','Saint Helena','si','Slovenia',
'sj','Svalbard and Jan Mayen Islands','sk','Slovak Republic','sl','Sierra Leone',
"ET_52","Sumale",
"ET_53","Tigray",
"ET_54","YeDebub Biheroch Bihereseboch na Hizboch",
-"FI_01","�land",
+"FI_01","Iland",
"FI_06","Lapland",
"FI_08","Oulu",
"FI_13","Southern Finland",
"KZ_01","Almaty",
"KZ_02","Almaty City",
"KZ_03","Aqmola",
-"KZ_04","Aqt�be",
+"KZ_04","Aqtebe",
"KZ_05","Astana",
"KZ_06","Atyrau",
"KZ_07","West Kazakhstan",
"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�slavas",
+"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",
print "<td class=\"aws\">".$DomainsHashIDLib{$countrycode}."</td>";
my $regionlib=RegionName($countrycode, $regioncode);
print "<td class=\"aws\">".($regionlib?$regionlib:' ')."</td>";
- print "<td class=\"aws\">".ucfirst($city)."</td>";
+ print "<td class=\"aws\">".ucfirst(EncodeToPageCode($city))."</td>";
if ($ShowCities =~ /P/i) { print "<td>".($_city_p{$key}?$_city_p{$key}:" ")."</td>"; }
if ($ShowCities =~ /P/i) { print "<td>".($_city_p{$key}?"$p_p %":' ')."</td>"; }
if ($ShowCities =~ /H/i) { print "<td>".($_city_h{$key}?$_city_h{$key}:" ")."</td>"; }
# else { print "<span style=\"color: #$color_other\">$Message[0]</span>"; }
# print "</td>";
print "<td>";
- if ($city) { print "$city"; }
+ if ($city) { print EncodeToPageCode($city); }
else { print "<span style=\"color: #$color_other\">$Message[0]</span>"; }
print "</td>";
}
# else { print "<span style=\"color: #$color_other\">$Message[0]</span>"; }
# print "</td>";
print "<td>";
- if ($city) { print "$city"; }
+ if ($city) { print EncodeToPageCode($city); }
else { print "<span style=\"color: #$color_other\">$Message[0]</span>"; }
print "</td>";
}
#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";
# ----->