Ignore:
Timestamp:
2006-01-24T10:29:34+13:00 (18 years ago)
Author:
kjdon
Message:

made all plugins that implement read() call read_block to check process_exp, block_exp, smart blocking, cover image blocking etc

File:
1 edited

Legend:

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

    r10254 r11090  
    6969    $self = (defined $hashArgOptLists)? new BasPlug($pluginlist,$inputargs,$hashArgOptLists): new BasPlug($pluginlist,$inputargs);
    7070
     71    if ($self->{'info_only'}) {
     72    # don't worry about any options etc
     73    return bless $self, $class;
     74    }
     75
    7176    my $parser = new XML::Parser('Style' => 'Stream',
    7277                 'Handlers' => {'Char' => \&Char,
     
    153158    my ($pluginfo, $base_dir, $file, $metadata, $processor, $maxdocs, $total_count, $gli) = @_;
    154159
    155     my $filename = $file;
    156     $filename = &util::filename_cat ($base_dir, $file) if $base_dir =~ /\w/;
    157 
    158     if ($self->{'block_exp'} ne "" && $filename =~ /$self->{'block_exp'}/) {
    159     $self->{'num_blocked'} ++;
    160     return 0;
    161     }
    162     if ($filename !~ /$self->{'process_exp'}/ || !-f $filename) {
    163     return undef;
    164     }
     160    # Make sure we're processing the correct file, do blocking etc
     161    my ($block_status,$filename) = $self->read_block(@_);   
     162    return $block_status if ((!defined $block_status) || ($block_status==0));
    165163
    166164    $file =~ s/^[\/\\]+//; # $file often begins with / so we'll tidy it up
Note: See TracChangeset for help on using the changeset viewer.