From: eldy <> Date: Tue, 29 Oct 2002 19:12:02 +0000 (+0000) Subject: Fixed: Correct a divided by 0 bug in full list url report when no hit on pages were... X-Git-Tag: AWSTATS_5_2_BETA~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=951b4413ac86079bcc2cf6c67e7e42db22e50d23;p=thirdparty%2FAWStats.git Fixed: Correct a divided by 0 bug in full list url report when no hit on pages were made. --- diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl index b8b45cb8..5d9f1f0d 100644 --- a/wwwroot/cgi-bin/awstats.pl +++ b/wwwroot/cgi-bin/awstats.pl @@ -6541,13 +6541,13 @@ EOF } if ($Debug) { debug("Total real / shown : $TotalPages / $total_p - $TotalEntries / $total_e - $TotalExits / $total_x - $TotalBytesPages / $total_k",2); } $rest_p=$TotalPages-$total_p; + $rest_k=$TotalBytesPages-$total_k; $rest_e=$TotalEntries-$total_e; $rest_x=$TotalExits-$total_x; - $rest_k=$TotalBytesPages-$total_k; if ($rest_p > 0 || $rest_e > 0 || $rest_k > 0) { print "$Message[2]"; if ($ShowPagesStats =~ /P/i) { print "".($rest_p?$rest_p:" ").""; } - if ($ShowPagesStats =~ /B/i) { print "".($rest_k?Format_Bytes($rest_k/$rest_p||1):" ").""; } + if ($ShowPagesStats =~ /B/i) { print "".($rest_k?Format_Bytes($rest_k/($rest_p||1)):" ").""; } if ($ShowPagesStats =~ /E/i) { print "".($rest_e?$rest_e:" ").""; } if ($ShowPagesStats =~ /X/i) { print "".($rest_x?$rest_x:" ").""; } # Call to plugin function ShowPagesAddField