[Bio] / FigKernelPackages / FIG.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/FIG.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.29, Sun Feb 15 17:12:54 2004 UTC revision 1.30, Tue Feb 17 22:23:36 2004 UTC
# Line 2764  Line 2764 
2764  sub assignments_made {  sub assignments_made {
2765      my($self,$genomes,$who,$date) = @_;      my($self,$genomes,$who,$date) = @_;
2766      my($relational_db_response,$entry,$fid,$fileno,$seek,$len,$ann);      my($relational_db_response,$entry,$fid,$fileno,$seek,$len,$ann);
2767      my($epoch_date);      my($epoch_date,$when,%sofar,$x);
2768    
2769      my %genomes = map { $_ => 1 } @$genomes;      my %genomes = map { $_ => 1 } @$genomes;
2770      if ($date =~ /^(\d{1,2})\/(\d{1,2})\/(\d{4})$/)      if ($date =~ /^(\d{1,2})\/(\d{1,2})\/(\d{4})$/)
# Line 2781  Line 2781 
2781      my $rdbH = $self->db_handle;      my $rdbH = $self->db_handle;
2782      if ($who eq "master")      if ($who eq "master")
2783      {      {
2784          $relational_db_response = $rdbH->SQL("SELECT fid, fileno, seek, len  FROM annotation_seeks WHERE ((ma = \'1\') AND (dateof > $epoch_date))");          $relational_db_response = $rdbH->SQL("SELECT fid, dateof, fileno, seek, len  FROM annotation_seeks WHERE ((ma = \'1\') AND (dateof > $epoch_date))");
2785      }      }
2786      else      else
2787      {      {
2788          $relational_db_response = $rdbH->SQL("SELECT fid, fileno, seek, len  FROM annotation_seeks WHERE (( who = \'$who\' ) AND (dateof > $epoch_date))");          $relational_db_response = $rdbH->SQL("SELECT fid, dateof, fileno, seek, len  FROM annotation_seeks WHERE (( who = \'$who\' ) AND (dateof > $epoch_date))");
2789      }      }
2790    
2791      if ($relational_db_response && (@$relational_db_response > 0))      if ($relational_db_response && (@$relational_db_response > 0))
2792      {      {
2793          foreach $entry (@$relational_db_response)          foreach $entry (@$relational_db_response)
2794          {          {
2795              ($fid,$fileno,$seek,$len) = @$entry;              ($fid,$when,$fileno,$seek,$len) = @$entry;
2796              if (($fid =~ /^fig\|(\d+\.\d+)/) && $genomes{$1})              if (($fid =~ /^fig\|(\d+\.\d+)/) && $genomes{$1})
2797              {              {
2798                  $ann = $self->read_annotation($fileno,$seek,$len);                  $ann = $self->read_annotation($fileno,$seek,$len);
# Line 2801  Line 2801 
2801                      (($who eq $3) || (($4 eq "master ") && ($who eq "master"))) &&                      (($who eq $3) || (($4 eq "master ") && ($who eq "master"))) &&
2802                      ($2 >= $epoch_date))                      ($2 >= $epoch_date))
2803                  {                  {
2804                      push(@assignments,[$1,$5]);                      if ((! $sofar{$1}) || (($x = $sofar{$1}) && ($when > $x->[0])))
2805                        {
2806                            $sofar{$1} = [$when,$5];
2807                        }
2808                  }                  }
2809              }              }
2810          }          }
2811      }      }
2812        @assignments = map { $x = $sofar{$_}; [$_,$x->[1]] } keys(%sofar);
2813      return @assignments;      return @assignments;
2814  }  }
2815    

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3