Changeset 22215
- Timestamp:
- 2010-06-01T15:54:17+12:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/BasePlugin.pm
r21742 r22215 115 115 'type' => "regexp", 116 116 'deft' => "", 117 'reqd' => "no" }, 118 { 'name' => "store_original_file", 119 'desc' => "{BasePlugin.store_original_file}", 120 'type' => "flag", 117 121 'reqd' => "no" }, 118 122 { 'name' => "associate_ext", … … 923 927 $self->associate_cover_image($doc_obj, $filename); 924 928 } 929 # store the original (used for eg TextPlugin to store the original for OAI) 930 if ($self->{'store_original_file'}) { 931 $self->associate_source_file($doc_obj, $filename); 932 } 925 933 926 934 … … 1126 1134 1127 1135 } 1136 sub associate_source_file { 1137 my $self = shift(@_); 1138 1139 my ($doc_obj, $filename) = @_; 1140 my $cursection = $doc_obj->get_top_section(); 1141 my $assocfilename = $doc_obj->get_assocfile_from_sourcefile(); 1142 1143 $doc_obj->associate_file($filename, $assocfilename, undef, $cursection); 1144 $doc_obj->add_utf8_metadata ($cursection, "srclink_file", "[SourceFile]"); 1145 } 1128 1146 1129 1147 sub associate_cover_image { 1130 my $self = shift ;1148 my $self = shift(@_); 1131 1149 my ($doc_obj, $filename) = @_; 1132 1150
Note:
See TracChangeset
for help on using the changeset viewer.