From: eldy <>
Date: Sat, 10 Apr 2004 20:17:30 +0000 (+0000)
Subject: When showing old history files (<5.4), sort is done on "hits" instead of "pages"...
X-Git-Tag: AWSTATS_6_1_BETA~24
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf31cb1c59fec7addbd1814eb9e844205cf6751a;p=thirdparty%2FAWStats.git
When showing old history files (<5.4), sort is done on "hits" instead of "pages" for section whose "pages" were not recorded.
---
diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl
index 45a1f196..da01bff6 100644
--- a/wwwroot/cgi-bin/awstats.pl
+++ b/wwwroot/cgi-bin/awstats.pl
@@ -8249,7 +8249,7 @@ if (scalar keys %HTMLOutput) {
print "\n";
$total_s=0;
my $count=0;
- &BuildKeyList($MaxRowsInHTMLOutput,$MinHit{'Refer'},\%_se_referrals_h,\%_se_referrals_p);
+ &BuildKeyList($MaxRowsInHTMLOutput,$MinHit{'Refer'},\%_se_referrals_h,((scalar keys %_se_referrals_p)?\%_se_referrals_p:\%_se_referrals_h)); # before 5.4 only hits were recorded
foreach my $key (@keylist) {
my $newreferer=CleanFromCSSA($SearchEnginesHashLib{$key}||$key);
my $p_p; my $p_h;
@@ -8307,7 +8307,7 @@ if (scalar keys %HTMLOutput) {
print "\n";
$total_s=0;
my $count=0;
- &BuildKeyList($MaxRowsInHTMLOutput,$MinHit{'Refer'},\%_pagesrefs_h,\%_pagesrefs_p);
+ &BuildKeyList($MaxRowsInHTMLOutput,$MinHit{'Refer'},\%_pagesrefs_h,((scalar keys %_pagesrefs_p)?\%_pagesrefs_p:\%_pagesrefs_h));
foreach my $key (@keylist) {
my $nompage=CleanFromCSSA($key);
if (length($nompage)>$MaxLengthOfShownURL) { $nompage=substr($nompage,0,$MaxLengthOfShownURL)."..."; }
@@ -9768,7 +9768,7 @@ if (scalar keys %HTMLOutput) {
print "
\n";
$total_p=0; $total_h=0;
my $count=0;
- &BuildKeyList($MaxNbOf{'RefererShown'},$MinHit{'Refer'},\%_se_referrals_h,\%_se_referrals_p);
+ &BuildKeyList($MaxNbOf{'RefererShown'},$MinHit{'Refer'},\%_se_referrals_h,((scalar keys %_se_referrals_p)?\%_se_referrals_p:\%_se_referrals_h));
foreach my $key (@keylist) {
my $newreferer=CleanFromCSSA($SearchEnginesHashLib{$key}||$key);
print "| - $newreferer | ";
@@ -9800,7 +9800,7 @@ if (scalar keys %HTMLOutput) {
print "\n";
$total_p=0; $total_h=0;
my $count=0;
- &BuildKeyList($MaxNbOf{'RefererShown'},$MinHit{'Refer'},\%_pagesrefs_h,\%_pagesrefs_p);
+ &BuildKeyList($MaxNbOf{'RefererShown'},$MinHit{'Refer'},\%_pagesrefs_h,((scalar keys %_pagesrefs_p)?\%_pagesrefs_p:\%_pagesrefs_h));
foreach my $key (@keylist) {
print "| - ";
&ShowURLInfo($key);
|