Changeset 16922

Show
Ignore:
Timestamp:
20.08.2008 17:45:33 (11 years ago)
Author:
ak19
Message:

1. The doclink uses the new SourceFile? metadata, which is the url-encoded reference to the associated file's name on the filesystem (which may itself be url-encoded originally). 2. The assocfilename calls the doc_obj's new method assocfile_from_sourcefile() to determine the name of the associate file from the SourceFile? metadata (the SourceFile? metadata being the url ref to the filename).

Files:
1 modified

Legend:

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

    r16888 r16922  
    481481    my $assocfilename = "doc.$doc_ext"; 
    482482    if ($self->{'keep_original_filename'} == 1) { 
    483     # this should be the same filename that was used for the Source metadata, as we will use [Source] in the srclink 
    484     ($assocfilename) = $file =~ /([^\\\/]+)$/; 
     483    # this should be the same filename that was used for the Source and SourceFile metadata,  
     484    # as we will use [SourceFile] in the srclink 
     485    $assocfilename = $doc_obj->assocfile_from_sourcefile(); #($assocfilename) = $file =~ /([^\\\/]+)$/; 
    485486    } 
    486487    $doc_obj->associate_file($filename, $assocfilename, undef, $cursection); 
     
    490491    my $doclink = "<a href=\"_httpprefix_/collect/[collection]/index/assoc/[archivedir]/doc.$doc_ext\">"; 
    491492    if ($self->{'keep_original_filename'} == 1) { 
    492     $doclink = "<a href=\"_httpprefix_/collect/[collection]/index/assoc/[archivedir]/[Source]\">"; 
     493    $doclink = "<a href=\"_httpprefix_/collect/[collection]/index/assoc/[archivedir]/[SourceFile]\">"; 
    493494    } 
    494495    $doc_obj->add_utf8_metadata ($cursection, "srclink",  $doclink);