Changeset 16392 for gsdl/trunk/perllib/plugins/CONTENTdmPlugin.pm
- Timestamp:
- 2008-07-14T14:57:38+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/plugins/CONTENTdmPlugin.pm
r15925 r16392 557 557 558 558 # Override ConvertBinaryFile read 559 # Needed so multiple .item files generate are sent down secondary plugin559 # Needed so multiple .item files generated are sent down secondary plugin 560 560 561 561 sub read { 562 562 my $self = shift (@_); 563 my ($pluginfo, $base_dir, $file, $ metadata, $processor, $maxdocs, $total_count, $gli) = @_;563 my ($pluginfo, $base_dir, $file, $block_hash, $metadata, $processor, $maxdocs, $total_count, $gli) = @_; 564 564 565 565 $self->{'gli'} = $gli; … … 570 570 my $outhandle = $self->{'outhandle'}; 571 571 572 my ($block_status,$filename) = $self->read_block(@_); 573 return $block_status if ((!defined $block_status) || ($block_status==0)); 572 my ($filename_full_path, $filename_no_path) = &util::get_full_filenames($base_dir, $file); 573 return undef unless $self->can_process_this_file($filename_full_path); 574 574 575 $file =~ s/^[\/\\]+//; # $file often begins with / so we'll tidy it up 575 576 … … 580 581 my $conv_filename_list = []; 581 582 582 $conv_filename_list = $self->tmp_area_convert_file($output_ext, $filename );583 $conv_filename_list = $self->tmp_area_convert_file($output_ext, $filename_full_path); 583 584 584 585 if (scalar(@$conv_filename_list)==0) { … … 611 612 my ($rv,$doc_obj) 612 613 = $secondary_plugin->read_into_doc_obj ($pluginfo,"", $conv_filename, 613 $ metadata, $processor, $maxdocs, $total_count,614 $block_hash, $metadata, $processor, $maxdocs, $total_count, 614 615 $gli); 615 616 … … 619 620 620 621 # Override previous gsdlsourcefilename set by secondary plugin 621 my $collect_file = &util::filename_within_collection($filename );622 my $collect_file = &util::filename_within_collection($filename_full_path); 622 623 my $collect_conv_file = &util::filename_within_collection($conv_filename); 623 624 $doc_obj->set_source_filename ($collect_file); … … 627 628 $self->set_Source_metadata($doc_obj, $filemeta); 628 629 $doc_obj->set_utf8_metadata_element($doc_obj->get_top_section(), "Plugin", "$self->{'plugin_type'}"); 629 $doc_obj->set_utf8_metadata_element($doc_obj->get_top_section(), "FileSize", (-s $filename ));630 $doc_obj->set_utf8_metadata_element($doc_obj->get_top_section(), "FileSize", (-s $filename_full_path)); 630 631 631 632 if ($self->{'cover_image'}) { 632 $self->associate_cover_image($doc_obj, $filename );633 $self->associate_cover_image($doc_obj, $filename_full_path); 633 634 } 634 635
Note:
See TracChangeset
for help on using the changeset viewer.