Changeset 21307
- Timestamp:
- 2009-12-09T13:19:28+13:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugin.pm
r21290 r21307 25 25 26 26 package plugin; 27 28 use inexport; 27 29 28 30 use strict; # to pick up typos and undeclared variables... … … 213 215 } 214 216 215 sub remove old{217 sub remove_all { 216 218 my ($pluginfo, $base_dir, $processor, $maxdocs) = @_; 217 219 218 map { $_->remove old($pluginfo, $base_dir, $processor, $maxdocs); } @$pluginfo;220 map { $_->remove_all($pluginfo, $base_dir, $processor, $maxdocs); } @$pluginfo; 219 221 } 220 222 221 223 sub remove_some { 224 my ($pluginfo, $archivedir, $deleted_files) = @_; 225 print STDERR "in remove some\n"; 226 return if (scalar(@$deleted_files)==0); 227 my $arcinfo_src_filename = &inexport::src_db_file($archivedir); 228 229 foreach my $file (@$deleted_files) { 230 # use 'archiveinf-src' GDBM file to look up all the OIDs 231 # that this file is used in (note in most cases, it's just one OID) 232 233 my $src_rec = GDBMUtils::gdbmRecordToHash($arcinfo_src_filename,$file); 234 my $oids = $src_rec->{'oid'}; 235 map {$_->remove_one($file, $oids); } @$pluginfo; 236 } 237 238 } 222 239 sub file_block_read { 223 240 my ($pluginfo, $base_dir, $file, $block_hash, $metadata, $gli) = @_;
Note:
See TracChangeset
for help on using the changeset viewer.