Ignore:
Timestamp:
2010-07-06T14:52:40+12:00 (14 years ago)
Author:
kjdon
Message:

previously, when use_realistic_book was set, all files listed in archivesinf dbs were in tidytmp - change paths to be import paths. This assumes that same directory structure is kept in tidytmp, which appears to be the case. No tidytmp paths should now appear in archiveinf dbs

File:
1 edited

Legend:

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

    r22348 r22355  
    753753
    754754    $filename = &util::filename_cat($base_dir, $filename);
     755    if (($self->{'use_realistic_book'}) || ($self->{'old_style_HDL'})) {
     756    # we are processing a tidytmp file - want paths to be in import
     757    $filename =~ s/([\\\/])tidytmp([\\\/])/$1import$2/;
     758    }
    755759    # Replace %XX's in URL with decoded value if required. Note that the filename may include the %XX in some
    756760    # situations. If the *original* file's name was in URL encoding, the following method will not decode it.
     
    15841588}
    15851589
     1590sub associate_cover_image
     1591{
     1592    my $self = shift(@_);
     1593    my ($doc_obj, $filename) = @_;
     1594    if (($self->{'use_realistic_book'}) || ($self->{'old_style_HDL'}))
     1595    {
     1596    # we will have cover image in tidytmp, but want it from import
     1597    $filename =~ s/([\\\/])tidytmp([\\\/])/$1import$2/;
     1598    }
     1599    $self->SUPER::associate_cover_image($doc_obj, $filename);
     1600}
     1601
     1602   
    158616031;
Note: See TracChangeset for help on using the changeset viewer.