- Timestamp:
- 2010-11-26T12:09:53+13:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/PagedImagePlugin.pm
r22814 r23349 316 316 317 317 #process the .item file 318 $doc_obj = $self->process_item($filename_full_path, $dir, $file, $processor );318 $doc_obj = $self->process_item($filename_full_path, $dir, $file, $processor, $metadata); 319 319 320 320 } … … 513 513 $self->{'doc_obj'} = new doc ($self->{'filename'}, "indexed_doc", $self->{'file_rename_method'}); 514 514 # TODO is file filenmae_no_path?? 515 $self->set_initial_doc_fields($self->{'doc_obj'}, $self->{'file'}, $self->{'processor'} );515 $self->set_initial_doc_fields($self->{'doc_obj'}, $self->{'file'}, $self->{'processor'}, $self->{'metadata'}); 516 516 517 517 my ($dir, $file) = $self->{'filename'} =~ /^(.*?)([^\/\\]*)$/; … … 540 540 sub set_initial_doc_fields { 541 541 my $self = shift(@_); 542 my ($doc_obj, $filename_no_path, $processor ) = @_;542 my ($doc_obj, $filename_no_path, $processor, $metadata) = @_; 543 543 544 544 my $topsection = $doc_obj->get_top_section(); … … 552 552 } 553 553 554 $self->set_Source_metadata($doc_obj, $filename_no_path); 554 my $plugin_filename_encoding = $self->{'filename_encoding'}; 555 my $filename_encoding = $self->deduce_filename_encoding($filename_no_path,$metadata,$plugin_filename_encoding); 556 $self->set_Source_metadata($doc_obj, $filename_no_path, $filename_encoding); 555 557 556 558 # if we want a header page, we need to add some text into the top section, otherwise this section will become invisible … … 615 617 sub process_item { 616 618 my $self = shift (@_); 617 my ($filename_full_path, $dir, $filename_no_path, $processor ) = @_;619 my ($filename_full_path, $dir, $filename_no_path, $processor, $metadata) = @_; 618 620 619 621 my $doc_obj = new doc ($filename_full_path, "indexed_doc", $self->{'file_rename_method'}); 620 $self->set_initial_doc_fields($doc_obj, $filename_no_path, $processor );622 $self->set_initial_doc_fields($doc_obj, $filename_no_path, $processor, $metadata); 621 623 my $topsection = $doc_obj->get_top_section(); 622 624 open (ITEMFILE, $filename_full_path) || die "couldn't open $filename_full_path\n";
Note:
See TracChangeset
for help on using the changeset viewer.