Changeset 23160


Ignore:
Timestamp:
2010-10-18T15:45:26+13:00 (11 years ago)
Author:
kjdon
Message:

member hash renamed, some tidying up

File:
1 edited

Legend:

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

    r23133 r23160  
    418418    if ($edit_mode eq "delete") {
    419419    # record this doc so we don't process the reconstructed doc later
    420     $self->{'dont_reconstruct'}->{$doc_obj->get_OID()} = 1;
     420    $self->{'dont_process_reconstructed'}->{$doc_obj->get_OID()} = 1;
    421421    # we don't need to do anything else for the info database for a deleted document. The infodb starts from scratch each time, so no deletion is necessary
    422     # do we need this??? where did num_docs come from, from reconstruction??
    423     #$self->{'num_docs'} -= 1 unless ($doctype eq "classification");
    424422    return;
    425423    }
     
    427425    if ($edit_mode eq "update") {
    428426    # we don't want to process the reconstructed doc later, but we will process this version now.
    429     $self->{'dont_reconstruct'}->{$doc_obj->get_OID()} = 1;
     427    $self->{'dont_process_reconstructed'}->{$doc_obj->get_OID()} = 1;
    430428    }
    431429
     
    439437    if (!defined $filename) {
    440438    # a reconstructed doc
    441     $self->{'num_bytes'} += $doc_obj->get_metadata_element ($doc_obj->get_top_section (), "total_numbytes");
    442     print STDERR "new numbytes = $self->{'num_bytes'}\n";
     439    my $num_reconstructed_bytes = $doc_obj->get_metadata_element ($doc_obj->get_top_section (), "total_numbytes");
     440    if (defined $num_reconstructed_bytes) {
     441        print STDERR "adding numbytes $num_reconstructed_bytes\n";
     442        $self->{'num_bytes'} += $num_reconstructed_bytes;
     443    }
    443444    }
    444445    # classify the document
    445446    &classify::classify_doc ($self->{'classifiers'}, $doc_obj);
    446447   
    447     # now add all the section to the infodb.
     448    # now add all the sections to the infodb.
    448449   
    449450    # is this a paged or a hierarchical document
     
    596597    unless ($self->is_incremental_capable())
    597598    {
    598         print STDERR "outputting db entry for doc number\n";
    599599        if ($self->{'db_level'} eq "document") {
    600600        &dbutil::write_infodb_entry($self->{'infodbtype'}, $infodb_handle, $self->{'num_docs'}, { 'section' => [ $doc_OID ] });
     
    610610    } # while defined section
    611611
    612     print STDERR "end of infodb edit\n";
    613612}
    614613
Note: See TracChangeset for help on using the changeset viewer.