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

Diff of /FigWebServices/cv.cgi

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

revision 1.10, Wed Oct 26 17:45:01 2005 UTC revision 1.11, Wed Oct 26 20:09:56 2005 UTC
# Line 228  Line 228 
228  {  {
229      my ($fig,$cgi,$html,$peg,$id_term_to_source) =@_ ;      my ($fig,$cgi,$html,$peg,$id_term_to_source) =@_ ;
230      my @id_term = keys(%{$id_term_to_source});      my @id_term = keys(%{$id_term_to_source});
231      my %sources={};   #in case someday we allow adds from >1 vocab at once      #my %sources={};   #in case someday we allow adds from >1 vocab at once
232      my $source;      my $source;
233        my $user = $cgi->param('user');
234    
235      foreach my $it (@id_term)      foreach my $it (@id_term)
236      {      {
237         $source = $id_term_to_source->{$it};         $source = $id_term_to_source->{$it};
238         $fig->add_attribute($peg,$source,$it);         my @temp = split("; ",$it);
239         $sources{$source}=1;   #build unique list of source names         my $id = $temp[0];
240           my $term = $temp[1];
241           my $status = $fig->add_cv_term( $user, $peg, $source, $id, $term);
242           if (!$status) {
243               print "$peg- Added ($source, $id, $term)\n";
244           }
245           else
246           {
247               print STDERR "$peg- Error for ($source, $id, $term):\t$status\n";
248               my(@html);
249               push(@html, $cgi->p("$peg- Error for ($source, $id, $term):\t$status\n"));
250               #&HTML::show_page($cgi, \@html, 1);
251               #exit;
252            }
253    
254    
255      }      }
256    
257      my %key_info_hash;      #$sources{$source}=1;   #build unique list of source names
258      $key_info_hash{"is_cv"} = 1;  
259      $key_info_hash{"single"} = 0;  
260      $key_info_hash{"readonly"} = 1;  
261        #my %key_info_hash;
262        #$key_info_hash{"is_cv"} = 1;
263        #$key_info_hash{"single"} = 0;
264        #$key_info_hash{"readonly"} = 1;
265    
266      $fig->key_info($source,\%key_info_hash);      #$fig->key_info($source,\%key_info_hash);
267    
268      #&show_initial($fig,$cgi,$html,$peg);      #&show_initial($fig,$cgi,$html,$peg);
269  }  }

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3