Changeset 21643

Show
Ignore:
Timestamp:
26.01.2010 17:17:32 (9 years ago)
Author:
mdewsnip
Message:

Changed IncrementalBuildUtils::addDocument() to take the infodbtype type as a parameter, instead of assuming GDBM. Part of making the code less GDBM-specific.

Location:
main/trunk/greenstone2/perllib
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/IncrementalBuildUtils.pm

    r21642 r21643  
    7171sub addDocument() 
    7272  { 
    73     my ($collection, $doc_obj, $section, $updateindex) = @_; 
     73    my ($collection, $infodbtype, $doc_obj, $section, $updateindex) = @_; 
    7474 
    7575    $updateindex = 0 unless defined($updateindex); 
    7676 
    77     print STDERR "IncrementalBuildUtils::addDocument('$collection',$doc_obj,'$section')\n" unless !$debug; 
     77    print STDERR "IncrementalBuildUtils::addDocument('$collection',$infodbtype,$doc_obj,'$section')\n" unless !$debug; 
    7878    # Gonna need to know in several places whether this is the top section 
    7979    # of the document or not 
     
    140140      { 
    141141        foreach my $subsection (@{$section_ptr->{'subsection_order'}}) { 
    142           &addDocument($collection, $doc_obj, "$section.$subsection"); 
     142          &addDocument($collection, $infodbtype, $doc_obj, "$section.$subsection"); 
    143143          push(@contains, "\".$subsection"); 
    144144        } 
  • main/trunk/greenstone2/perllib/lucenebuildproc.pm

    r20732 r21643  
    498498          } 
    499499        print STDERR "\n*** incrementally add metadata from document at: " . $file . "\n" if ($self->{'verbosity'} > 3); 
    500         &IncrementalBuildUtils::addDocument($self->{'collection'}, $doc_obj, $doc_obj->get_top_section()); 
     500        &IncrementalBuildUtils::addDocument($self->{'collection'}, $self->{'infodbtype'}, $doc_obj, $doc_obj->get_top_section()); 
    501501      } 
    502502    else