[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.733, Sat Oct 25 13:37:47 2008 UTC revision 1.734, Wed Nov 12 16:03:53 2008 UTC
# Line 19299  Line 19299 
19299      $parms{-override} ||=  0;  #  Moved default here      $parms{-override} ||=  0;  #  Moved default here
19300    
19301      #  Check for required parameters      #  Check for required parameters
   
19302      return 0 if ! $parms{-status};      return 0 if ! $parms{-status};
19303      return 0 if ! ( $parms{-peg} || $parms{-md5} );      return 0 if ! ( $parms{-peg} || $parms{-md5} );
19304      return 0 if ! $parms{-pubmed};      return 0 if ! $parms{-pubmed};
# Line 19327  Line 19326 
19326      {      {
19327          #  Default is no clobber except uncurated (i.e., $status eq ' ') -- GJO          #  Default is no clobber except uncurated (i.e., $status eq ' ') -- GJO
19328          if ( ( $db_resp->[0]->[0] ne ' ' ) && ( ! $override ) ) { return 0 }          if ( ( $db_resp->[0]->[0] ne ' ' ) && ( ! $override ) ) { return 0 }
19329    
19330          $rdbH->SQL( "DELETE          $rdbH->SQL( "DELETE
19331                       FROM dlits                       FROM dlits
19332                       WHERE ((md5_hash = '$md5') and (pubmed = '$pubmed'))"                       WHERE ((md5_hash = '$md5') and (pubmed = '$pubmed'))"
# Line 19632  Line 19632 
19632      return 1;      return 1;
19633  }  }
19634    
19635    =head3 get_dlits_for_peg
19636    
19637        $dlits = $fig->get_dlits_for_peg();
19638    
19639    Returns a reference to an array of current dlit data for a peg.
19640    
19641    The returned value is
19642    
19643        [ [ status, md5_hash, pubmed, curator, go_code ], ... ]
19644    =cut
19645    
19646    sub get_dlits_for_peg {
19647        my ( $self, $peg ) = @_;
19648        my $rdbH  = $self->db_handle;
19649    
19650        if ( !defined( $peg ) ) {
19651            return undef;
19652        }
19653    
19654        my $md5    = $self->md5_of_peg( $peg );
19655    
19656        my $db_resp = $rdbH->SQL( "SELECT * FROM dlits WHERE (md5_hash = '$md5')" );
19657        return $db_resp;
19658    }
19659    
19660  ################################# PEG Translation  ####################################  ################################# PEG Translation  ####################################
19661    

Legend:
Removed from v.1.733  
changed lines
  Added in v.1.734

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3