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/SplitPlug.pm

    r10254 r11090  
    9393    $self->{'process_exp'} = $self->get_default_process_exp ();
    9494    if ($self->{'process_exp'} eq "") {
    95         warn ref($self) . " Warning: Non-recursive plugin has no process_exp\n";
     95        warn ref($self) . " Warning: plugin has no process_exp\n";
    9696    }
    9797    }
     
    185185    my $verbosity = $self->{'verbosity'};
    186186
    187     # Figure out the exact filename of this file (and maybe block it)
    188     my $filename = &util::filename_cat($base_dir, $file);
    189     my $block_exp = $self->{'block_exp'};
    190     return 0 if $self->{'block_exp'} ne "" && $filename =~ /$self->{'block_exp'}/;
    191     if ($filename !~ /$self->{'process_exp'}/ || !-f $filename) {
    192     return undef;
    193     }
     187    #check process and block exps, smart block, etc
     188    my ($block_status,$filename) = $self->read_block(@_);   
     189    return $block_status if ((!defined $block_status) || ($block_status==0));
     190
    194191    $file =~ s/^[\/\\]+//; # $file often begins with / so we'll tidy it up
    195192
     
    228225    $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "SourceSegment", "$segment");
    229226    if ($self->{'cover_image'}) {
    230       $self->associate_cover_image($doc_obj, $filename);
     227        $self->associate_cover_image($doc_obj, $filename);
    231228    }
    232229    $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Plugin", "$self->{'plugin_type'}");
Note: See TracChangeset for help on using the changeset viewer.