Changeset 16392 for gsdl/trunk/perllib/plugins/DBPlugin.pm
- Timestamp:
- 2008-07-14T14:57:38+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/plugins/DBPlugin.pm
r16104 r16392 80 80 sub read { 81 81 my $self = shift (@_); 82 my ($pluginfo, $base_dir, $file, $ metadata, $processor, $maxdocs,$total_count,$gli) = @_;82 my ($pluginfo, $base_dir, $file, $block_hash, $metadata, $processor, $maxdocs,$total_count,$gli) = @_; 83 83 84 84 #see if we can handle the passed file... 85 my ($block_status,$filename) = $self->read_block(@_);86 return $block_status if ((!defined $block_status) || ($block_status==0));87 85 my ($filename_full_path, $filename_no_path) = &util::get_full_filenames($base_dir, $file); 86 return undef unless $self->can_process_this_file($filename_full_path); 87 88 88 my $outhandle = $self->{'outhandle'}; 89 89 my $verbosity = $self->{'verbosity'}; … … 120 120 121 121 # read in config file. 122 if (!open (CONF, $filename )) {123 print $outhandle "DBPlugin: can't read $filename : $!\n";122 if (!open (CONF, $filename_full_path)) { 123 print $outhandle "DBPlugin: can't read $filename_full_path: $!\n"; 124 124 return 0; 125 125 } … … 172 172 $err =~ s/\.$//; # remove a trailing . 173 173 print $outhandle "DBPlugin: error evaluating `$statement'\n"; 174 print $outhandle " $err (in $filename )\n";174 print $outhandle " $err (in $filename_full_path)\n"; 175 175 return 0; # there was an error reading the config file 176 176 } … … 189 189 190 190 if (!defined($db)) { 191 print $outhandle "DBPlugin: error: $filename does not specify a db!\n";191 print $outhandle "DBPlugin: error: $filename_full_path does not specify a db!\n"; 192 192 return 0; 193 193 } … … 254 254 255 255 # create a new document 256 my $doc_obj = new doc ($filename , "indexed_doc");256 my $doc_obj = new doc ($filename_full_path, "indexed_doc"); 257 257 $doc_obj->set_OIDtype ($processor->{'OIDtype'}, $processor->{'OIDmetadata'}); 258 258 my $cursection = $doc_obj->get_top_section(); … … 272 272 273 273 if ($self->{'cover_image'}) { 274 $self->associate_cover_image($doc_obj, $filename );274 $self->associate_cover_image($doc_obj, $filename_full_path); 275 275 } 276 276 $doc_obj->add_utf8_metadata($doc_obj->get_top_section(), "Plugin", "$self->{'plugin_type'}");
Note:
See TracChangeset
for help on using the changeset viewer.