From: eldy <> Date: Sat, 7 Dec 2002 03:37:27 +0000 (+0000) Subject: Fixed: 29th february 2004 will be correctly handled. X-Git-Tag: AWSTATS_5_3_BETA~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6fa0a688e35a6a14a2575560db2e37862b939f3;p=thirdparty%2FAWStats.git Fixed: 29th february 2004 will be correctly handled. --- diff --git a/wwwroot/cgi-bin/awstats.model.conf b/wwwroot/cgi-bin/awstats.model.conf index 4db32fba..55612c96 100644 --- a/wwwroot/cgi-bin/awstats.model.conf +++ b/wwwroot/cgi-bin/awstats.model.conf @@ -756,9 +756,9 @@ ShowHTTPErrorsStats=1 # particular reporting. # # Stats by domains -MaxNbOfDomain = 20 +MaxNbOfDomain = 10 # Stats by hosts -MaxNbOfHostsShown = 20 +MaxNbOfHostsShown = 10 MinHitHost = 1 # Stats by authenticated users MaxNbOfLoginShown = 10 @@ -767,16 +767,16 @@ MinHitLogin = 1 MaxNbOfRobotShown = 10 MinHitRobot = 1 # Stats by pages -MaxNbOfPageShown = 20 +MaxNbOfPageShown = 10 MinHitFile = 1 # Stats by referers MaxNbOfRefererShown = 10 MinHitRefer = 1 # Stats for keyphrases -MaxNbOfKeyphrasesShown = 20 +MaxNbOfKeyphrasesShown = 10 MinHitKeyphrase = 1 # Stats for keywords -MaxNbOfKeywordsShown = 20 +MaxNbOfKeywordsShown = 10 MinHitKeyword = 1 # Stats for emails MaxNbOfEMailsShown = 20 diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl index 589642cd..c2195592 100644 --- a/wwwroot/cgi-bin/awstats.pl +++ b/wwwroot/cgi-bin/awstats.pl @@ -912,7 +912,9 @@ sub DateIsValid { if ($day > 30) { return 0; } } if ($month==2) { - if ($day > 28) { return 0; } + my $leapyear=($year%4==0?1:0); # A leap year every 4 years + if ($year%100==0 && $year%400!=0) { $leapyear=0; } # Except if year is 100x and not 400x + if ($day > (28+$leapyear)) { return 0; } } return 1; }