Ignore:
Timestamp:
2010-03-03T11:09:07+13:00 (14 years ago)
Author:
kjdon
Message:

srclink now generated dynamically at runtime. instead of storing srclink metadata, we store srclink_file metadata, which can be a value (doc.doc) or a metadata format element (eg [SourceFile]).

File:
1 edited

Legend:

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

    r21742 r21760  
    498498    # We use set instead of add here because we only want one value
    499499    $doc_obj->set_utf8_metadata_element($cursection, "FileFormat", $file_type);
    500     my $doclink = "<a href=\"_httpprefix_/collect/[collection]/index/assoc/[assocfilepath]/doc.$doc_ext\">";
     500    my $srclink_filename = "doc.$doc_ext";
     501    #my $doclink = "<a href=\"_httpprefix_/collect/[collection]/index/assoc/[assocfilepath]/doc.$doc_ext\">";
    501502    if ($self->{'keep_original_filename'} == 1) {
    502     $doclink = "<a href=\"_httpprefix_/collect/[collection]/index/assoc/[assocfilepath]/[SourceFile]\">";
    503     }
    504     $doc_obj->add_utf8_metadata ($cursection, "srclink",  $doclink);
     503    $srclink_filename = "[SourceFile]";
     504    #$doclink = "<a href=\"_httpprefix_/collect/[collection]/index/assoc/[assocfilepath]/[SourceFile]\">";
     505    }
     506    #$doc_obj->add_utf8_metadata ($cursection, "srclink",  $doclink);
    505507    $doc_obj->add_utf8_metadata ($cursection, "srcicon",  "_icon".$doc_ext."_");
    506     $doc_obj->add_utf8_metadata ($cursection, "/srclink", "</a>");
    507 
     508    #$doc_obj->add_utf8_metadata ($cursection, "/srclink", "</a>");
     509    $doc_obj->add_utf8_metadata ($cursection, "srclink_file", $srclink_filename);
    508510    return 1;
    509511}
Note: See TracChangeset for help on using the changeset viewer.