Changeset 16257 for gsdl


Ignore:
Timestamp:
2008-07-01T12:01:11+12:00 (16 years ago)
Author:
mdewsnip
Message:

Tidied up the block of code that determines whether each doc.xml file should be processed (based on whether incremental building is enabled) to make it easier to follow.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/plugins/ArchivesInfPlugin.pm

    r16013 r16257  
    138138        next if $tmp eq $file;
    139139
    140         # Decide if file needs to be processed
    141         my $doc_oid = $subfile->[1];
    142         my $index_status = $archive_info->get_status_info($doc_oid);
     140        # We always process the file...
     141        my $process_file = 1;
    143142
    144         my $process_file = 0;
    145        
    146         if (!$processor->is_incremental_capable() || !$self->{'incremental'}) {
    147         $process_file = 1;
    148         }
    149         else {
    150             # is incremental
    151 
    152             # check to see if file needs to be indexed
    153         $index_status = $archive_info->get_status_info($doc_oid);
    154 
    155         if ($index_status eq "I") {
    156             $process_file = 1;
     143        # ...unless the build processor is incremental capable and -incremental was specified
     144        if ($processor->is_incremental_capable() && $self->{'incremental'})
     145        {
     146            # We don't need to process the file if it has already been built
     147        my $doc_oid = $subfile->[1];
     148        my $index_status = $archive_info->get_status_info($doc_oid);
     149        if ($index_status eq "B")
     150        {
     151            # Don't process this file
     152            $process_file = 0;
    157153        }
    158154        }
Note: See TracChangeset for help on using the changeset viewer.