Changeset 23461 for main/trunk/greenstone2/perllib
- Timestamp:
- 2010-12-13T14:48:20+13:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/BasePlugin.pm
r23458 r23461 934 934 sub set_Source_metadata { 935 935 my $self = shift (@_); 936 my ($doc_obj, $raw_filename, $filename_encoding ) = @_;937 936 my ($doc_obj, $raw_filename, $filename_encoding, $section) = @_; 937 938 938 # 1. Sets the filename (Source) for display encoded as Unicode if possible, 939 939 # and (as a fallback) using %xx if not for non-ascii chars … … 943 943 my ($unused_full_rf, $raw_file) = &util::get_full_filenames("", $raw_filename); 944 944 945 my $t op_section =$doc_obj->get_top_section();945 my $this_section = (defined $section)? $section : $doc_obj->get_top_section(); 946 946 947 947 my $octet_file = $raw_file; … … 984 984 985 985 # Source is the UTF8 display name - not necessarily the name of the file on the system 986 $doc_obj->set_utf8_metadata_element($t op_section, "Source", $url_encoded_filename);986 $doc_obj->set_utf8_metadata_element($this_section, "Source", $url_encoded_filename); 987 987 988 988 my $renamed_raw_file = &util::rename_file($raw_file, $self->{'file_rename_method'}); … … 991 991 my $renamed_raw_url = &unicode::filename_to_url($renamed_raw_file); 992 992 993 $doc_obj->set_utf8_metadata_element($t op_section, "SourceFile",993 $doc_obj->set_utf8_metadata_element($this_section, "SourceFile", 994 994 $renamed_raw_url); 995 995
Note:
See TracChangeset
for help on using the changeset viewer.