[Bio] / FigWebServices / get_dlits.cgi Repository:
ViewVC logotype

Diff of /FigWebServices/get_dlits.cgi

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

revision 1.12, Thu Jul 10 19:52:23 2008 UTC revision 1.13, Thu Jun 25 22:45:59 2009 UTC
# Line 123  Line 123 
123    
124  #  This is a one-time special case to add an index to the dlits table  #  This is a one-time special case to add an index to the dlits table
125    
 if ( $user eq 'master:gjo' && $cgi->param('add_pubmed_index') ) { &add_pubmed_index( $rdbH, $html ) }  
   
126    
127  #  Process a page of curated literature ----------------------------------------  #  Process a page of curated literature ----------------------------------------
128    
# Line 612  Line 610 
610      push( @$html, $cgi->h2( "<FONT Color=green>Made $n_change requested changes.</FONT>" ) );      push( @$html, $cgi->h2( "<FONT Color=green>Made $n_change requested changes.</FONT>" ) );
611  }  }
612    
   
 # Not sure why this was not done before  
   
 sub add_pubmed_index {  
     my ( $rdbH, $html ) = @_;  
     return if ! $rdbH;  
     my $rtn = $rdbH->SQL( 'SHOW INDEX FROM dlits' );  
     push @$html, "<BR />Initial return value from 'SHOW INDEX FROM dlits' = $rtn\n";  
     if ( $rtn == 3 )  
     {  
         my $rtn = $rdbH->create_index( idx  => "pubmed_in_dlits_ix",  
                                        tbl  => "dlits",  
                                        type => "btree",  
                                        flds => "pubmed" );  
         $rtn = $rdbH->SQL( 'SHOW INDEX FROM dlits' );  
         push @$html, "<BR />Final return value from 'SHOW INDEX FROM dlits' = $rtn<BR />\n";  
     }  
     else  
     {  
         push @$html, "<BR />Index might already exist<BR />\n";  
     }  
 }  

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3