Release 0.6.2
[usenet/yapfaq.git] / yapfaq.pl
index be8762c..bac7fb8 100644 (file)
--- a/yapfaq.pl
+++ b/yapfaq.pl
@@ -12,7 +12,7 @@
 # It can be redistributed and/or modified under the same terms under 
 # which Perl itself is published.
 
 # It can be redistributed and/or modified under the same terms under 
 # which Perl itself is published.
 
-my $Version = "0.6.1";
+my $Version = "0.6.2";
 
 my $NNTPServer = "localhost";
 my $NNTPUser = "";
 
 my $NNTPServer = "localhost";
 my $NNTPUser = "";
@@ -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*$/) {
       $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;
          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";
   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];
 
   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];
 
This page took 0.010822 seconds and 4 git commands to generate.