Fix default for Expires.
Bug introduced in v0.6.1. Signed-off-by: Thomas Hochstein <thh@inter.net>
This commit is contained in:
parent
fd0f4fcfae
commit
7823ece977
|
@ -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;
|
||||
|
@ -224,6 +223,8 @@ sub postfaq {
|
|||
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];
|
||||
|
||||
|
|
Loading…
Reference in a new issue