X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FSpot.pm;fp=perl%2FSpot.pm;h=a2b9eee04efe5d9856f4e9d104721350818e495a;hb=a386178f3c1bfcd3d0975d94448245b8c4203988;hp=76d6e0b63191036f733d168e08636447e684f0ea;hpb=a1d04753520ceb925c85f1acbb97d23d4161ab54;p=spider.git diff --git a/perl/Spot.pm b/perl/Spot.pm index 76d6e0b6..a2b9eee0 100644 --- a/perl/Spot.pm +++ b/perl/Spot.pm @@ -21,7 +21,8 @@ use QSL; use strict; -use vars qw($fp $statp $maxspots $defaultspots $maxdays $dirprefix $duplth $dupage $filterdef $totalspots $hfspots $vhfspots $maxcalllth $can_encode); +use vars qw($fp $statp $maxspots $defaultspots $maxdays $dirprefix $duplth $dupage $filterdef + $totalspots $hfspots $vhfspots $maxcalllth $can_encode $use_db_for_search); $fp = undef; $statp = undef; @@ -52,6 +53,7 @@ $filterdef = bless ([ ], 'Filter::Cmd'); $totalspots = $hfspots = $vhfspots = 0; +$use_db_for_search = 0; # create a Spot Object sub new @@ -250,7 +252,7 @@ sub search $to = $from + $maxspots if $to - $from > $maxspots || $to - $from <= 0; - if ($main::dbh) { + if ($main::dbh && $use_db_for_search) { return $main::dbh->spot_search($expr, $dayfrom, $dayto, $to-$from, $dxchan); }