Changeset 22567

Show
Ignore:
Timestamp:
04.08.2010 15:56:11 (9 years ago)
Author:
kjdon
Message:

the last step in mark_docs_for_deletion, only do it in delete mode. Otherwise it will remove the primary that was marked for reindex, and it won't be reindexed.

Files:
1 modified

Legend:

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

    r22535 r22567  
    142142    my $site       = $self->{'site'}; 
    143143    my $out        = $self->{'out'}; 
    144  
     144  
    145145    if (($collection = &colcfg::use_collection($site, $collection, $collectdir)) eq "") { 
    146146    &PrintUsage::print_txt_usage($options, "{import.params}"); 
     
    11081108     
    11091109    } 
    1110     # now go through and check that we haven't marked any primary files for reindex (because their associated files have changed/deleted) when they have been deleted themselves. 
    1111     foreach my $file (@$deleted_files) { 
    1112     if (defined $block_hash->{'reindex_files'}->{$file}) { 
    1113         delete $block_hash->{'reindex_files'}->{$file}; 
     1110    # now go through and check that we haven't marked any primary files for reindex (because their associated files have changed/deleted) when they have been deleted themselves. only in delete mode. 
     1111    if ($mode eq "delete") { 
     1112    foreach my $file (@$deleted_files) { 
     1113        if (defined $block_hash->{'reindex_files'}->{$file}) { 
     1114        delete $block_hash->{'reindex_files'}->{$file}; 
     1115        } 
    11141116    } 
    11151117    }