X-Git-Url: https://code.th-h.de/?p=usenet%2Fyapfaq.git;a=blobdiff_plain;f=yapfaq.pl;h=fcee8117e3b89b44ee06c74d1f0ac6ba7ea15492;hp=be8762c6797eaa1c9c7d32b5d4ea477831773c8e;hb=7823ece977875aa84460a1415c7cfab7fa96aa1a;hpb=fd0f4fcfae928aaf11fdefe56bc8674be3f40e99;ds=sidebyside diff --git a/yapfaq.pl b/yapfaq.pl index be8762c..fcee811 100644 --- a/yapfaq.pl +++ b/yapfaq.pl @@ -152,7 +152,6 @@ sub readconfig{ $Error .= "E: The Posting-frequency for your project \"$$Config[$i]{'name'}\" is invalid.\n" } unless(!$$Config[$i]{'expires'} || $$Config[$i]{'expires'} =~ /^\s*\d+\s*[dwmy]\s*$/) { - $$Config[$i]{'expires'} = '3m'; # set default: 3 month warn "$0: W: The Expires for your project \"$$Config[$i]{'name'}\" is invalid - set to 3 month.\n"; } $Error .= "-" x 25 . "\n" if $Error; @@ -223,7 +222,9 @@ sub postfaq { my $wday = ("Sun","Mon","Tue","Wed","Thu","Fri","Sat")[$time[6]]; my $year = (1900 + $time[5]); my $tz = $time[8] ? " +0200" : " +0100"; - + + $$Expire = '3m' if !$$Expire; # set default if unset: 3 month + my ($expY,$expM,$expD) = calcdelta ($year,$month,$day,$$Expire); my $expmonthN = ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")[$expM-1];