From db7747a775a39ec1828fc78b9442f301ed32b195 Mon Sep 17 00:00:00 2001 From: minima Date: Mon, 14 May 2001 19:25:49 +0000 Subject: [PATCH] change the max number of days to search for spots to 100 --- Changes | 1 + perl/Spot.pm | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index f6c0c42f..3b80c7a5 100644 --- a/Changes +++ b/Changes @@ -2,6 +2,7 @@ 1. fix problem with re-reading in db definitions for remote databases. 2. try to prevent situations where two can (semi) successfully login, probably under load, and get a 'tried to connect whilst already connected' abort. +3. change the max number of days to search for spots to 100 11May01======================================================================= 1. allow stat/msg on priv 1 07May01======================================================================= 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; -- 2.34.1