Show
Ignore:
Timestamp:
27.05.2008 15:02:16 (12 years ago)
Author:
mdewsnip
Message:

(Adding new DB support) Added $infodb_type as first argument to all the dbutil functions.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/classify.pm

    r15705 r15725  
    233233sub reconstruct_doc_objs_metadata 
    234234{ 
    235     my ($infodb_file_path) = @_; 
     235    my $infodb_type = shift(@_); 
     236    my $infodb_file_path = shift(@_); 
    236237 
    237238    my %database_recs; 
    238     &dbutil::read_infodb_file($infodb_file_path, \%database_recs); 
     239    &dbutil::read_infodb_file($infodb_type, $infodb_file_path, \%database_recs); 
    239240 
    240241    # dig out top level doc sections 
     
    293294sub output_classify_info 
    294295{ 
    295     my ($classifiers, $infodb_handle, $remove_empty_classifications, $gli) = @_; 
     296    my ($classifiers, $infodb_type, $infodb_handle, $remove_empty_classifications, $gli) = @_; 
    296297 
    297298    $gli = 0 unless defined $gli; 
     
    313314    } 
    314315 
    315     &print_classify_info ($infodb_handle, $classifyinfo, "", $remove_empty_classifications); 
     316    &print_classify_info($infodb_type, $infodb_handle, $classifyinfo, "", $remove_empty_classifications); 
    316317} 
    317318 
     
    319320sub print_classify_info 
    320321{ 
    321     my ($infodb_handle, $classifyinfo, $OID, $remove_empty_classifications) = @_; 
     322    my ($infodb_type, $infodb_handle, $classifyinfo, $OID, $remove_empty_classifications) = @_; 
    322323 
    323324    $OID =~ s/^\.+//; # just for good luck 
     
    381382            #rint STDERR "Result: \"" . join(";", @{$clids}) . "\"\n"; 
    382383             
    383         &print_classify_info ($infodb_handle, $tempinfo, $tempinfo->{'classifyOID'}, 
     384        &print_classify_info ($infodb_type, $infodb_handle, $tempinfo, $tempinfo->{'classifyOID'}, 
    384385                  $remove_empty_classifications); 
    385386    } elsif (defined ($tempinfo->{'OID'})) { 
     
    426427                #rint STDERR "Result: \"" . join(";", @{$clids}) . "\"\n"; 
    427428         
    428         &print_classify_info ($infodb_handle, $tempinfo, "$OID.$next_subOID", 
     429        &print_classify_info ($infodb_type, $infodb_handle, $tempinfo, "$OID.$next_subOID", 
    429430                      $remove_empty_classifications); 
    430431        $next_subOID++; 
     
    438439    if ($mdoffset_text !~ m/^;+$/); 
    439440     
    440     &dbutil::write_infodb_entry($infodb_handle, $OID, \%classify_infodb); 
     441    &dbutil::write_infodb_entry($infodb_type, $infodb_handle, $OID, \%classify_infodb); 
    441442} 
    442443