Changeset 23419 for main/trunk/greenstone2/perllib/plugins/BasePlugin.pm
- Timestamp:
- 2010-12-09T00:10:10+13:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/BasePlugin.pm
r23418 r23419 382 382 } 383 383 384 sub block_filename 385 { 386 my $self = shift(@_); 387 my ($block_hash,$filename) = @_; 388 389 if ($ENV{'GSDLOS'} =~ m/^windows$/) { 390 391 my $lower_drive = $filename; 392 $lower_drive =~ s/^([A-Z]):/\l$1:/i; 393 394 my $upper_drive = $filename; 395 $upper_drive =~ s/^([A-Z]):/\u$1:/i; 396 397 $block_hash->{'file_blocks'}->{$lower_drive} = 1; 398 $block_hash->{'file_blocks'}->{$upper_drive} = 1; 399 } 400 else { 401 $block_hash->{'file_blocks'}->{$filename} = 1; 402 } 403 } 404 384 405 # rename imported files and assoc files using URL encoding by default 385 406 # as this will work for most plugins and give more legible filenames … … 417 438 418 439 if ($self->{'block_exp'} ne "" && $filename_full_path =~ /$self->{'block_exp'}/) { 419 $ block_hash->{'file_blocks'}->{$filename_full_path} = 1;440 $self->block_filename($block_hash,$filename_full_path); 420 441 } 421 442 … … 437 458 } 438 459 if (&util::fd_exists($coverfile)) { 439 $ block_hash->{'file_blocks'}->{$coverfile} = 1;460 $self->block_filename($block_hash,$coverfile); 440 461 } 441 462 } … … 1169 1190 my ($textref, $pluginfo, $base_dir, $file, $metadata, $doc_obj, $gli) = @_; 1170 1191 1171 gsprintf(STDERR, "BasePlugin::process {common.must_be_implemented}\n") && die "\n"; 1192 gsprintf(STDERR, "BasePlugin::process {common.must_be_implemented}\n"); 1193 1194 my ($cpackage,$cfilename,$cline,$csubr,$chas_args,$cwantarray) = caller(1); 1195 print STDERR "Calling method: $cfilename:$cline $cpackage->$csubr\n"; 1196 1197 die "\n"; 1172 1198 1173 1199 return undef; # never gets here
Note:
See TracChangeset
for help on using the changeset viewer.