Changeset 21559

Show
Ignore:
Timestamp:
21.01.2010 14:49:19 (9 years ago)
Author:
mdewsnip
Message:

Changed calls to GDBMUtils::gdbmDatabaseRemove() to dbutil::delete_infodb_entry(). Part of removing GDBMUtils.pm and making the code less GDBM-specific.

Location:
main/trunk/greenstone2/perllib
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/inexport.pm

    r21558 r21559  
    311311 
    312312    # delete the src record 
    313     GDBMUtils::gdbmDatabaseRemove($arcinfo_src_filename,$file); 
     313    my $src_infodb_file_handle = &dbutil::open_infodb_write_handle("gdbm", $arcinfo_src_filename, "append"); 
     314    &dbutil::delete_infodb_entry("gdbm", $src_infodb_file_handle, $file); 
     315    &dbutil::close_infodb_write_handle("gdbm", $src_infodb_file_handle); 
    314316     
    315317    foreach my $oid (@$oids) { 
  • main/trunk/greenstone2/perllib/plugins/ArchivesInfPlugin.pm

    r21315 r21559  
    102102    if (defined $archive_info) { 
    103103    my $archive_info_filename = $self->{'archive_info_filename'}; 
     104    my $infodb_file_handle = &dbutil::open_infodb_write_handle("gdbm", $archive_info_filename, "append"); 
    104105 
    105106        my $file_list = $archive_info->get_file_list(); 
     
    113114        # delete 
    114115        $archive_info->delete_info($doc_oid); 
    115         &GDBMUtils::gdbmDatabaseRemove($archive_info_filename,$doc_oid); 
     116        &dbutil::delete_infodb_entry("gdbm", $infodb_file_handle, $doc_oid); 
    116117 
    117118        my $doc_file = $subfile->[0]; 
     
    135136    } 
    136137 
     138    &dbutil::close_infodb_write_handle("gdbm", $infodb_file_handle); 
    137139    $archive_info->save_info($archive_info_filename); 
    138140    }