Changeset 20830


Ignore:
Timestamp:
2009-10-21T16:10:29+13:00 (15 years ago)
Author:
kjdon
Message:

save filename_no_path and use it to call set_Source_metadata for doc_obj in open document. all other plugins do this. prevents lots of undefined variable errors later on.

File:
1 edited

Legend:

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

    r18899 r20830  
    211211    $self->{'file'} = $file;
    212212    $self->{'filename'} = $filename_full_path;
     213    $self->{'filename_no_path'} = $filename_no_path;
    213214    $self->{'processor'} = $processor;
    214215    # this contains metadata passed in from running metadata_read with other plugins (eg from MetadataXMLPlugin)
     
    370371    $self->{'doc_obj'} = new doc ($self->{'filename'}, "indexed_doc", $self->{'file_rename_method'});
    371372    $self->{'doc_obj'}->add_utf8_metadata($self->{'doc_obj'}->get_top_section(), "Plugin", "$self->{'plugin_type'}");
     373    $self->set_Source_metadata($self->{'doc_obj'}, $self->{'filename_no_path'});
     374   
    372375
    373376    # do we want other auto metadata here (see BasePlugin.read_into_doc_obj)
Note: See TracChangeset for help on using the changeset viewer.