Ignore:
Timestamp:
2009-01-19T18:08:49+13:00 (15 years ago)
Author:
ak19
Message:

Modified srcreplaceable plugins (plugins which operate on docs where the source file can be replaced with their converted htmls) to set the file_rename_method to none for secondary plugins (for Text, HTML, and PagedImage plugins) so that the file is not renamed several times.

File:
1 edited

Legend:

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

    r17744 r18406  
    112112    }
    113113
     114    if (!defined $secondary_plugin_options->{'HTMLPlugin'}) {
     115    $secondary_plugin_options->{'HTMLPlugin'} = [];
     116    }
     117
    114118    my $text_options = $secondary_plugin_options->{'TextPlugin'};
    115 
    116     if (defined $self->{'convert_to'} && $self->{'convert_to'} =~ /pagedimg.*/i) {
     119    my $html_options = $secondary_plugin_options->{'HTMLPlugin'};
     120
     121    if (defined $self->{'convert_to'} && $self->{'convert_to'} =~ m/(pagedimage|pagedimg).*/i) {
    117122    if (!defined $secondary_plugin_options->{'PagedImagePlugin'}){
    118123        $secondary_plugin_options->{'PagedImagePlugin'} = [];
    119124        my $pagedimg_options = $secondary_plugin_options->{'PagedImagePlugin'};
    120125        push(@$pagedimg_options, "-title_sub", '^(Page\s+\d+)?(\s*1\s+)?');
     126        push(@$pagedimg_options, "-file_rename_method", "none");
    121127    }
    122128    }
     
    130136    push(@$text_options , "-title_sub", '^(Page\s+\d+)?(\s*1\s+)?');
    131137
     138    push(@$text_options, "-file_rename_method", "none");
     139    push(@$html_options, "-file_rename_method", "none");
     140   
    132141    $self = bless $self, $class;
    133142    # used for convert_post_process
Note: See TracChangeset for help on using the changeset viewer.