Changeset 20791


Ignore:
Timestamp:
2009-10-07T15:54:37+13:00 (13 years ago)
Author:
kjdon
Message:

new option -processing_tmp_files - if set, then don't store the assicated files using associate_source_file - we don't want to store tmp files in the archivesinf databases

Location:
gsdl/trunk/perllib/plugins
Files:
2 edited

Legend:

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

    r20778 r20791  
    114114      { 'name' => "old_style_HDL",
    115115        'desc' => "{HTMLPlugin.old_style_HDL}",
    116     'type' => "flag"}
     116    'type' => "flag"},
     117      {'name' => "processing_tmp_files",
     118       'desc' => "{BasePlugin.processing_tmp_files}",
     119       'type' => "flag",
     120       'hiddengli' => "yes"}
    117121      ];
    118122
     
    147151# may want to use (?i)\.(gif|jpe?g|jpe|png|css|js(?:@.*)?)$
    148152# if have eg <script language="javascript" src="img/lib.js@123">
     153# blocking is now done by reading through the file and recording all the
     154# images and other files
    149155sub get_default_block_exp {
    150156    my $self = shift (@_);
     
    758764    }
    759765    # add the original image file as a source file
    760     $doc_obj->associate_source_file($filename);
     766    if (!$self->{'processing_tmp_files'} ) {
     767    $doc_obj->associate_source_file($filename);
     768    }
    761769    if ($self->{'rename_assoc_files'}) {
    762770    if (defined $self->{'aux_files'}->{$href}) {
  • gsdl/trunk/perllib/plugins/PagedImagePlugin.pm

    r20778 r20791  
    175175    'list' => $type_list,
    176176    'deft' => "paged",
    177     'reqd' => "no" } ];
     177    'reqd' => "no" },
     178      {'name' => "processing_tmp_files",
     179       'desc' => "{BasePlugin.processing_tmp_files}",
     180       'type' => "flag",
     181       'hiddengli' => "yes"}
     182];
    178183
    179184
     
    397402    return 0 if ($filename_no_path eq "" || !-f $filename_full_path);
    398403 
    399     # remember that this image file was one of our source files
    400     $doc_obj->associate_source_file($filename_full_path);
    401  
     404    # remember that this image file was one of our source files, but only
     405    # if we are not processing a tmp file
     406    if (!$self->{'processing_tmp_files'} ) {
     407    $doc_obj->associate_source_file($filename_full_path);
     408    }
    402409    # do rotation
    403410    if  ((defined $rotate) && ($rotate eq "r")) {
     
    620627    }
    621628
    622     # remember that this text file was one of our source files
    623     $doc_obj->associate_source_file($filename_full_path);
     629    # remember that this text file was one of our source files, but only
     630    # if we are not processing a tmp file
     631    if (!$self->{'processing_tmp_files'} ) {
     632    $doc_obj->associate_source_file($filename_full_path);
     633    }
    624634    # Do encoding stuff
    625635    my ($language, $encoding) = $self->textcat_get_language_encoding ($filename_full_path);
Note: See TracChangeset for help on using the changeset viewer.