From: eldy <> Date: Sun, 23 Mar 2003 15:34:09 +0000 (+0000) Subject: -month parameter can accept format -month=D not only -month=DD X-Git-Tag: AWSTATS_5_5_BETA~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f4acbcd65e1f58ef69c73a420743cf41f6d86fe;p=thirdparty%2FAWStats.git -month parameter can accept format -month=D not only -month=DD --- diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl index 2b600beb..c8cd25ea 100644 --- a/wwwroot/cgi-bin/awstats.pl +++ b/wwwroot/cgi-bin/awstats.pl @@ -4603,9 +4603,9 @@ $QueryString=~s/(^|&)output(&|$)//i; $QueryString=~s/&+$//; if ($QueryString =~ /(^|&)month=(year)/i) { error("month=year is a deprecated option. Use month=all instead."); } if ($QueryString =~ /(^|&)year=(\d\d\d\d)/i) { $YearRequired="$2"; } else { $YearRequired="$nowyear"; } -if ($QueryString =~ /(^|&)month=(\d\d)/i || $QueryString =~ /(^|&)month=(all)/i) { $MonthRequired="$2"; } +if ($QueryString =~ /(^|&)month=(\d{1,2})/i || $QueryString =~ /(^|&)month=(all)/i) { $MonthRequired=sprintf("%02d",$2); } else { $MonthRequired="$nowmonth"; } -if ($QueryString =~ /(^|&)day=(\d\d)/i) { $DayRequired="$2"; } # day is a hidden option. Must not be used (Make results not understandable). Available for users that rename history files with day. +if ($QueryString =~ /(^|&)day=(\d{1,2})/i) { $DayRequired=sprintf("%02d",$2); } # day is a hidden option. Must not be used (Make results not understandable). Available for users that rename history files with day. else { $DayRequired=''; } # Print AWStats and Perl version