[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.18, Mon Jan 5 12:26:58 2004 UTC revision 1.19, Tue Jan 6 18:14:48 2004 UTC
# Line 2809  Line 2809 
2809  sub assignments_made {  sub assignments_made {
2810      my($self,$genomes,$who,$date) = @_;      my($self,$genomes,$who,$date) = @_;
2811      my($relational_db_response,$entry,$fid,$fileno,$seek,$len,$ann);      my($relational_db_response,$entry,$fid,$fileno,$seek,$len,$ann);
2812        my($epoch_date);
2813    
2814      my %genomes = map { $_ => 1 } @$genomes;      my %genomes = map { $_ => 1 } @$genomes;
2815      $date = defined($date) ? $date-1 : 0;      if ($date =~ /^(\d{1,2})\/(\d{1,2})\/(\d{4})$/)
2816        {
2817            my($mm,$dd,$yyyy) = ($1,$2,$3);
2818            $epoch_date = &Time::Local::timelocal(0,0,0,$dd,$mm-1,$yyyy-1900,0,0,0);
2819        }
2820        else
2821        {
2822            $epoch_date = 0;
2823        }
2824        $epoch_date = defined($epoch_date) ? $epoch_date-1 : 0;
2825      my @assignments = ();      my @assignments = ();
2826      my $rdbH = $self->db_handle;      my $rdbH = $self->db_handle;
2827      if ($who eq "master")      if ($who eq "master")
2828      {      {
2829          $relational_db_response = $rdbH->SQL("SELECT fid, fileno, seek, len  FROM annotation_seeks WHERE ((ma = \'1\') AND (dateof > $date))");          $relational_db_response = $rdbH->SQL("SELECT fid, fileno, seek, len  FROM annotation_seeks WHERE ((ma = \'1\') AND (dateof > $epoch_date))");
2830      }      }
2831      else      else
2832      {      {
2833          $relational_db_response = $rdbH->SQL("SELECT fid, fileno, seek, len  FROM annotation_seeks WHERE (( who = \'$who\' ) AND (dateof > $date))");          $relational_db_response = $rdbH->SQL("SELECT fid, fileno, seek, len  FROM annotation_seeks WHERE (( who = \'$who\' ) AND (dateof > $epoch_date))");
2834      }      }
2835    
2836      if ($relational_db_response && (@$relational_db_response > 0))      if ($relational_db_response && (@$relational_db_response > 0))
# Line 2834  Line 2844 
2844    
2845                  if (($ann =~ /^(fig\|\d+\.\d+\.peg\.\d+)\n(\d+)\n(\S+)\nSet ([^\n]*)function[^\n]*\n(\S[^\n]+\S)/s) &&                  if (($ann =~ /^(fig\|\d+\.\d+\.peg\.\d+)\n(\d+)\n(\S+)\nSet ([^\n]*)function[^\n]*\n(\S[^\n]+\S)/s) &&
2846                      (($who eq $3) || (($4 eq "master ") && ($who eq "master"))) &&                      (($who eq $3) || (($4 eq "master ") && ($who eq "master"))) &&
2847                      ($2 >= $date))                      ($2 >= $epoch_date))
2848                  {                  {
2849                      push(@assignments,[$1,$5]);                      push(@assignments,[$1,$5]);
2850                  }                  }

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3