change the max number of days to search for spots to 100
authorminima <minima>
Mon, 14 May 2001 19:25:49 +0000 (19:25 +0000)
committerminima <minima>
Mon, 14 May 2001 19:25:49 +0000 (19:25 +0000)
Changes
perl/Spot.pm

diff --git a/Changes b/Changes
index f6c0c42ffb5a47f6b82ecbeaf93545bbddcd35b1..3b80c7a509b2530477fa423097a35766cff89043 100644 (file)
--- 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=======================================================================
index a37a195ea8469ce55b6a65b89be35cbb39fbeaf8..8b66b0f6c762f78c398c230a64856a7ae89a621a 100644 (file)
@@ -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;