Ignore:
Timestamp:
2017-03-09T14:35:57+13:00 (7 years ago)
Author:
kjdon
Message:

util::block_file moved to EncodingUtil::block_raw_filename

Location:
main/trunk/greenstone2/perllib/plugins
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/DSpacePlugin.pm

    r28563 r31480  
    152152
    153153    if (&FileUtils::fileTest($handle_filename)) {
    154     &util::block_filename($block_hash,$handle_filename);
     154    $self->block_raw_filename($block_hash,$handle_filename);
    155155    }
    156156}
  • main/trunk/greenstone2/perllib/plugins/GreenstoneXMLPlugin.pm

    r28836 r31480  
    110110    $file =~ s/^[\/\\]+//; # $file often begins with / so we'll tidy it up
    111111   
    112     print $outhandle "GreenstoneXMLlugin: setting up block list for $file\n"
     112    print $outhandle "GreenstoneXMLPlugin: setting up block list for $file\n"
    113113    if $self->{'verbosity'} > 1;
    114114
     
    126126        }
    127127
    128         &util::block_filename($block_hash,$full_gsdl_assoc_filename);       
     128        # is this raw filename here, or unicode?? assuming unicode
     129        # however we have concatenated raw directory???
     130        $self->block_filename($block_hash,$full_gsdl_assoc_filename);       
    129131        }
    130132    }
  • main/trunk/greenstone2/perllib/plugins/HTMLPlugin.pm

    r31446 r31480  
    290290        if($unicode_url_original_filename ne $unicode_html_fname) {
    291291            # Allow for possibility of raw byte version and Unicode versions of file
    292             &util::block_filename($block_hash,$unicode_url_original_filename);
     292            $self->block_filename($block_hash,$unicode_url_original_filename);
    293293        }
    294294    }
    295295
    296296    # $url_original_filename = &util::upgrade_if_dos_filename($url_original_filename);
    297     &util::block_filename($block_hash,$url_original_filename) if $url_original_filename ne $html_fname;
     297    # TODO now use unicode files in block, do we need this??
     298    #$self->block_raw_filename($block_hash,$url_original_filename) if $url_original_filename ne $html_fname;
    298299
    299300    # but only add the linked file to the blocklist if the current html file does not link to itself
     
    12921293        $unicode_dirname = &unicode::raw_filename_to_url_encoded($dirname);
    12931294        }
    1294    
     1295        print STDERR "unicode dirname = ".&unicode::debug_unicode_string($unicode_dirname)."\n";
    12951296        $before_hash = &FileUtils::filenameConcatenate($unicode_dirname, $before_hash);
    12961297        $before_hash = $self->eval_dir_dots($before_hash);   
  • main/trunk/greenstone2/perllib/plugins/HathiTrustMETSPlugin.pm

    r31284 r31480  
    514514    my ($file_root) = ($filename_full_path =~ m/^(.*)\.mets\.xml$/);
    515515
    516     &util::block_filename($block_hash,"$file_root.zip");
    517     &util::block_filename($block_hash,"$file_root.json");
     516    $self->block_raw_filename($block_hash,"$file_root.zip");
     517    $self->block_raw_filename($block_hash,"$file_root.json");
    518518
    519519    my $page_dir = $file_root;
     
    530530        my $txt_filename = &FileUtils::filenameConcatenate($page_dir,$1);
    531531        my $topics_filename = $txt_filename . ".topics";
    532         &util::block_filename($block_hash,$txt_filename);
    533         &util::block_filename($block_hash,$topics_filename);
     532        $self->block_raw_filename($block_hash,$txt_filename);
     533        $self->block_raw_filename($block_hash,$topics_filename);
    534534    }
    535535    }
  • main/trunk/greenstone2/perllib/plugins/ISISPlugin.pm

    r28603 r31480  
    143143    print STDERR "$self->{'fdt_file_path'}\n";
    144144    my $fdt_file = $self->{'fdt_file_path'};
    145     &util::block_filename($block_hash,$fdt_file);
     145    $self->block_raw_filename($block_hash,$fdt_file);
    146146    }
    147147    if (-e $self->{'xrf_file_path'}) {
    148148    print STDERR "$self->{'xrf_file_path'}\n";
    149149    my $xrf_file = $self->{'xrf_file_path'};
    150     &util::block_filename($block_hash,$xrf_file);
     150    $self->block_raw_filename($block_hash,$xrf_file);
    151151    }
    152152   
  • main/trunk/greenstone2/perllib/plugins/MetadataCSVPlugin.pm

    r27321 r31480  
    120120
    121121    # add the file to the block list so that it won't be processed in read, as we will do all we can with it here
    122     &util::block_filename($block_hash,$filename);
     122    $self->block_raw_filename($block_hash,$filename);
    123123
    124124
  • main/trunk/greenstone2/perllib/plugins/MetadataXMLPlugin.pm

    r31444 r31480  
    258258    print $outhandle "MetadataXMLPlugin: processing $file\n" if ($self->{'verbosity'})> 1;
    259259    # add the file to the block list so that it won't be processed in read, as we will do all we can with it here
    260     &util::block_filename($block_hash,$filename);
     260    $self->block_raw_filename($block_hash,$filename);
    261261
    262262    $self->{'metadataref'} = $extrametadata;
  • main/trunk/greenstone2/perllib/plugins/PagedImagePlugin.pm

    r31113 r31480  
    647647
    648648    if ($line =~ /imgfile=\"([^\"]+)\"/) {
    649         &util::block_filename($block_hash,&FileUtils::filenameConcatenate($dir,$1));
     649        $self->block_raw_filename($block_hash,&FileUtils::filenameConcatenate($dir,$1));
    650650    }
    651651    if ($line =~ /txtfile=\"([^\"]+)\"/) {
    652         &util::block_filename($block_hash,&FileUtils::filenameConcatenate($dir,$1));
     652        $self->block_raw_filename($block_hash,&FileUtils::filenameConcatenate($dir,$1));
    653653    }
    654654    }
     
    677677    # find the image file if there is one
    678678    if (defined $imgname && $imgname ne "") {
    679         &util::block_filename($block_hash, &FileUtils::filenameConcatenate( $dir,$imgname));
     679        $self->block_raw_filename($block_hash, &FileUtils::filenameConcatenate( $dir,$imgname));
    680680    }
    681681    # find the text file if there is one
    682682    if (defined $txtname && $txtname ne "") {
    683         &util::block_filename($block_hash, &FileUtils::filenameConcatenate($dir,$txtname));
     683        $self->block_raw_filename($block_hash, &FileUtils::filenameConcatenate($dir,$txtname));
    684684    }
    685685    }
Note: See TracChangeset for help on using the changeset viewer.