Changeset 10217 for trunk/gsdl/perllib/doc.pm
- Timestamp:
- 2005-07-06T15:25:48+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/doc.pm
r9953 r10217 57 57 'OIDtype'=>"hash"}, $class; 58 58 59 #GRB: Added code to set lastmodified for OAI purposes 60 if ((defined $doc_type) && (defined $source_filename) && (-e $source_filename)) { 61 my $file_stat = stat($source_filename); 62 my $mtime = $file_stat->mtime; 63 $self->add_utf8_metadata($self->get_top_section(), "lastmodified", $file_stat->mtime); 64 } 65 #GRB: end inserted code 66 59 # used to set lastmodified here, but this can screw up the HASH ids, so 60 # the docsave processor now calls set_lastmodified 61 67 62 if (defined $source_filename) { 68 63 my $collect_dir = $ENV{'GSDLCOLLECTDIR'}; … … 97 92 98 93 return $self; 94 } 95 # set lastmodified for OAI purposes, added by GRB, moved by kjdon 96 sub set_lastmodified { 97 my $self = shift (@_); 98 99 my $source_filename = $self->get_source_filename(); 100 if ((defined $self->get_metadata_element ($self->get_top_section(), "gsdldoctype")) && 101 (defined $source_filename) && (-e $source_filename)) { 102 my $file_stat = stat($source_filename); 103 my $mtime = $file_stat->mtime; 104 $self->add_utf8_metadata($self->get_top_section(), "lastmodified", $file_stat->mtime); 105 } 99 106 } 100 107 … … 192 199 } 193 200 194 # returns the source_filename as it was provided201 # returns the gsdldoctype as it was provided 195 202 # the default of "indexed_doc" is used if no document 196 203 # type was provided
Note:
See TracChangeset
for help on using the changeset viewer.