]> dxcluster.net Git - spider.git/commitdiff
fix the problem now created with spots with no text
authorminima <minima>
Wed, 31 Aug 2005 19:05:18 +0000 (19:05 +0000)
committerminima <minima>
Wed, 31 Aug 2005 19:05:18 +0000 (19:05 +0000)
perl/Spot.pm

index f331d105b540ae1cd2e4b414c631ffcfbf97eca4..9a4b97249b46ab1516e50567aad96c4ede332a2c 100644 (file)
@@ -350,12 +350,14 @@ sub dup
        my $ldupkey = "X$freq|$call|$by|$text";
        my $t = DXDupe::find($ldupkey);
        return 1 if $t && $t - $main::systime > 0;
-       DXDupe::add($ldupkey, $main::systime+$dupage);
-       $otext = substr($otext, 0, $duplth) if length $otext > $duplth; 
-       $ldupkey = "X$freq|$call|$by|$otext";
-       $t = DXDupe::find($ldupkey);
-       return 1 if $t && $t - $main::systime > 0;
-       DXDupe::add($ldupkey, $main::systime+$dupage);
+       if ($otext) {
+               DXDupe::add($ldupkey, $main::systime+$dupage);
+               $otext = substr($otext, 0, $duplth) if length $otext > $duplth; 
+               $ldupkey = "X$freq|$call|$by|$otext";
+               $t = DXDupe::find($ldupkey);
+               return 1 if $t && $t - $main::systime > 0;
+               DXDupe::add($ldupkey, $main::systime+$dupage);
+       }
 #      my $sdupkey = "X$freq|$call|$by";
 #      $t = DXDupe::find($sdupkey);
 #      return 1 if $t && $t - $main::systime > 0;