X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FSpot.pm;h=8b66b0f6c762f78c398c230a64856a7ae89a621a;hb=db7747a775a39ec1828fc78b9442f301ed32b195;hp=a37a195ea8469ce55b6a65b89be35cbb39fbeaf8;hpb=8cdf937edf493134e69b2df1ec689839148f2d8f;p=spider.git diff --git a/perl/Spot.pm b/perl/Spot.pm index a37a195e..8b66b0f6 100644 --- a/perl/Spot.pm +++ b/perl/Spot.pm @@ -23,7 +23,7 @@ use vars qw($fp $maxspots $defaultspots $maxdays $dirprefix $duplth $dupage $fil $fp = undef; $maxspots = 50; # maximum spots to return $defaultspots = 10; # normal number of spots to return -$maxdays = 3*31; # normal maximum no of days to go back +$maxdays = 100; # normal maximum no of days to go back $dirprefix = "spots"; $duplth = 20; # the length of text to use in the deduping $dupage = 3*3600; # the length of time to hold spot dups @@ -169,7 +169,8 @@ sub search my @todate; $dayfrom = 0 if !$dayfrom; - $dayto = $maxdays if !$dayto; + $dayto = $maxdays unless $dayto; + $dayto = $dayfrom + $maxdays if $dayto < $dayfrom; @fromdate = Julian::sub(@today, $dayfrom); @todate = Julian::sub(@fromdate, $dayto); $from = 0 unless $from;