Changeset 16392 for gsdl/trunk/perllib/plugins/HTMLPlugin.pm
- Timestamp:
- 2008-07-14T14:57:38+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/plugins/HTMLPlugin.pm
r16247 r16392 491 491 { 492 492 my $self = shift (@_); 493 my ($pluginfo, $base_dir, $file, $metadata, $processor, $maxdocs, $total_count, $gli) = @_; 494 495 # check the process_exp and block_exp thing 496 my ($block_status,$filename) = $self->read_block(@_); 497 return $block_status if ((!defined $block_status) || ($block_status==0)); 498 493 my ($pluginfo, $base_dir, $file, $block_hash, $metadata, $processor, $maxdocs, $total_count, $gli) = @_; 494 499 495 # get the input file 500 496 my $input_filename = $file; … … 523 519 524 520 # call the parent read_into_doc_obj 525 my ($process_status,$doc_obj) = $self->SUPER::read_into_doc_obj($pluginfo, $base_dir, $file, $ metadata, $processor, $maxdocs, $total_count, $gli);521 my ($process_status,$doc_obj) = $self->SUPER::read_into_doc_obj($pluginfo, $base_dir, $file, $block_hash, $metadata, $processor, $maxdocs, $total_count, $gli); 526 522 527 523 return ($process_status,$doc_obj); … … 554 550 my $self = shift (@_); 555 551 556 return q^(?i)\.(gif|jpe?g|jpe|jpg|png|css)$^; 552 #return q^(?i)\.(gif|jpe?g|jpe|jpg|png|css)$^; 553 return ""; 557 554 } 558 555 … … 567 564 { 568 565 my $self =shift (@_); 569 my ($filename) = @_; 570 my $html_fname = $filename; 566 my ($filename_full_path, $block_hash) = @_; 567 568 my $html_fname = $filename_full_path; 571 569 my @file_blocks; 572 570 573 my ($language, $encoding) = $self->textcat_get_language_encoding ($filename );571 my ($language, $encoding) = $self->textcat_get_language_encoding ($filename_full_path); 574 572 575 573 # read in file ($text will be in utf8) 576 574 my $text = ""; 577 $self->read_file ($filename , $encoding, $language, \$text);575 $self->read_file ($filename_full_path, $encoding, $language, \$text); 578 576 my $textref = \$text; 579 577 my $opencom = '(?:<!--|<!(?:—|—|--))'; … … 600 598 if ($link !~ m@^/@ && $link !~ m/^([A-Z]:?)\\/) { 601 599 # Turn relative file path into full path 602 my $dirname = &File::Basename::dirname($filename );600 my $dirname = &File::Basename::dirname($filename_full_path); 603 601 $link = &util::filename_cat($dirname, $link); 604 602 } 605 603 $link = $self->eval_dir_dots($link); 606 604 607 $ self->{'file_blocks'}->{$link} = 1;605 $block_hash->{'file_blocks'}->{$link} = 1; 608 606 } 609 607 }
Note:
See TracChangeset
for help on using the changeset viewer.