Changeset 21614
- Timestamp:
- 2010-01-25T16:30:53+13:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/ArchivesInfPlugin.pm
r21566 r21614 100 100 101 101 if (defined $archive_info) { 102 # Get the infodbtype value for this collection from the arcinfo object 103 my $infodbtype = $archive_info->{'infodbtype'}; 102 104 my $archive_info_filename = $self->{'archive_info_filename'}; 103 my $infodb_file_handle = &dbutil::open_infodb_write_handle( "gdbm", $archive_info_filename, "append");105 my $infodb_file_handle = &dbutil::open_infodb_write_handle($infodbtype, $archive_info_filename, "append"); 104 106 105 107 my $file_list = $archive_info->get_file_list(); … … 113 115 # delete 114 116 $archive_info->delete_info($doc_oid); 115 &dbutil::delete_infodb_entry( "gdbm", $infodb_file_handle, $doc_oid);117 &dbutil::delete_infodb_entry($infodbtype, $infodb_file_handle, $doc_oid); 116 118 117 119 my $doc_file = $subfile->[0]; … … 135 137 } 136 138 137 &dbutil::close_infodb_write_handle( "gdbm", $infodb_file_handle);139 &dbutil::close_infodb_write_handle($infodbtype, $infodb_file_handle); 138 140 $archive_info->save_info($archive_info_filename); 139 141 } … … 220 222 my $count = 0; 221 223 224 # This function only makes sense at build-time 225 return if (ref($processor) !~ /buildproc$/); 226 227 # Get the infodbtype value for this collection from the buildproc object 228 my $infodbtype = $processor->{'infodbtype'}; 229 222 230 # see if this has a archives information file within it 223 231 ## my $archive_info_filename = &util::filename_cat($base_dir,$file,"archives.inf"); 224 225 my $archive_info_filename = &dbutil::get_infodb_file_path("gdbm", "archiveinf-doc", &util::filename_cat($base_dir, $file)); 232 my $archive_info_filename = &dbutil::get_infodb_file_path($infodbtype, "archiveinf-doc", &util::filename_cat($base_dir, $file)); 226 233 227 234 if (-e $archive_info_filename) { … … 231 238 232 239 # read in the archives information file 233 my $archive_info = new arcinfo ();240 my $archive_info = new arcinfo($infodbtype); 234 241 $self->{'archive_info'} = $archive_info; 235 242 $self->{'archive_info_filename'} = $archive_info_filename;
Note:
See TracChangeset
for help on using the changeset viewer.