Ignore:
Timestamp:
2010-01-21T15:03:35+13:00 (14 years ago)
Author:
mdewsnip
Message:

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

File:
1 edited

Legend:

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

    r17087 r21561  
    149149    # Load the raw text for the document object from GDBM
    150150    my $collection = $self->{'collection'};
    151     my $text = &GDBMUtils::gdbmCachedCollectionGet($collection, $self->{'oid'});
     151    my $index_text_directory_path = &util::filename_cat($ENV{'GSDLHOME'}, "collect", $collection, "index", "text");
     152    my $infodb_file_path = &dbutil::get_infodb_file_path("gdbm", $collection, $index_text_directory_path);
     153    my $text = &dbutil::read_infodb_entry("gdbm", $infodb_file_path, $self->{'oid'});
    152154    # For each line in the raw text, extract the key (enclosed in angle
    153155    # brackets) and the value
     
    193195    if($doc_num >= 0)
    194196      {
    195         my $text = &GDBMUtils::gdbmCachedCollectionGet($collection, $doc_num);
     197    my $index_text_directory_path = &util::filename_cat($ENV{'GSDLHOME'}, "collect", $collection, "index", "text");
     198    my $infodb_file_path = &dbutil::get_infodb_file_path("gdbm", $collection, $index_text_directory_path);
     199    my $text = &dbutil::read_infodb_entry("gdbm", $infodb_file_path, $doc_num);
     200
    196201        # If there is no reverse lookup, then add one now
    197202        if($text !~ /<section>/)
Note: See TracChangeset for help on using the changeset viewer.