Changeset 21586

Show
Ignore:
Timestamp:
22.01.2010 16:50:15 (9 years ago)
Author:
mdewsnip
Message:

Changed DirectoryPlugin? to use the infodbtype value from the arcinfo object in the processor, instead of being hard-wired to use GDBM. Part of making the code less GDBM-specific.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/DirectoryPlugin.pm

    r21566 r21586  
    124124    my ($pluginfo, $base_dir, $processor, $maxdocs) = @_; 
    125125 
     126    # Only lookup timestamp info for import.pl, and only if incremental is set 
    126127    my $proc_package_name = ref $processor; 
    127  
    128128    if ($proc_package_name !~ /buildproc$/ && $self->{'incremental'} == 1) { 
    129  
    130     # Only lookup timestamp info for import.pl, and only if incremental is set 
    131  
     129        # Get the infodbtype value for this collection from the arcinfo object 
     130        my $infodbtype = $processor->getoutputinfo()->{'infodbtype'}; 
    132131    my $output_dir = $processor->getoutputdir(); 
    133132##  my $archives_inf = &util::filename_cat($output_dir,"archives.inf"); 
    134         my $archives_inf = &dbutil::get_infodb_file_path("gdbm", "archiveinf-doc", $output_dir); 
     133        my $archives_inf = &dbutil::get_infodb_file_path($infodbtype, "archiveinf-doc", $output_dir); 
    135134 
    136135    if ( -e $archives_inf ) {