Changeset 22222 for main/trunk/greenstone2/perllib/basebuildproc.pm
- Timestamp:
- 2010-06-02T15:59:57+12:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/basebuildproc.pm
r20420 r22222 415 415 } 416 416 417 if (($edit_mode eq "add") || ($edit_mode eq "update")) {417 if (($edit_mode eq "add")) {# || ($edit_mode eq "update")) { 418 418 #add this document to the browse structure 419 419 push(@{$self->{'doclist'}},$doc_obj->get_OID()) 420 420 unless ($doctype eq "classification"); 421 421 } 422 else { 422 # elsif ($edit_mode eq "update") { 423 # don't do anything. this assumes it will keep the same id. 424 # } 425 elsif ($edit_mode eq "delete") { 423 426 # delete => remove this doc from browse structure 424 427 my $del_doc_oid = $doc_obj->get_OID(); … … 435 438 &classify::classify_doc ($self->{'classifiers'}, $doc_obj, $edit_mode); 436 439 437 if (($edit_mode eq "add") || ($edit_mode eq "update")) {440 if (($edit_mode eq "add")) {# || ($edit_mode eq "update")) { 438 441 # this is another document 439 442 $self->{'num_docs'} += 1 unless ($doctype eq "classification"); 440 443 } 441 els e{444 elsif ($edit_mode eq "delete") { 442 445 # delete 443 446 $self->{'num_docs'} -= 1 unless ($doctype eq "classification"); … … 463 466 my %section_infodb = (); 464 467 465 # update a few statistics 466 if (($edit_mode eq "add") || ($edit_mode eq "update")) {468 # update a few statistics - how do we do update???? 469 if (($edit_mode eq "add")) {# || ($edit_mode eq "update")) { 467 470 468 471 $self->{'num_bytes'} += $doc_obj->get_text_length ($section); 469 472 $self->{'num_sections'} += 1 unless ($doctype eq "classification"); 470 473 } 471 els e{474 elsif ($edit_mode eq "delete") { 472 475 # delete 473 476 $self->{'num_bytes'} -= $doc_obj->get_text_length ($section); … … 599 602 600 603 if (($edit_mode eq "add") || ($edit_mode eq "update")) { 601 604 # in case of update, this will overwrite old entry?? 602 605 &dbutil::write_infodb_entry($self->{'infodbtype'}, $infodb_handle, $section_OID, \%section_infodb); 603 606 }
Note:
See TracChangeset
for help on using the changeset viewer.