Ignore:
Timestamp:
2009-02-03T09:46:33+13:00 (15 years ago)
Author:
davidb
Message:

Addition of 'edit_mode' parameter to classify(). This can be either 'add' 'delete' or 'reindex' (should think about renaming the last one to something more appropriate, e.g. update).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/classify/AZSectionList.pm

    r17209 r18455  
    7171sub classify {
    7272    my $self = shift (@_);
    73     my ($doc_obj) = @_;
     73    my ($doc_obj,$edit_mode) = @_;
    7474
    7575    my $doc_OID = $doc_obj->get_OID();
     
    7777
    7878    while (defined $thissection) {
    79     $self->classify_section ($thissection, $doc_obj);
     79    $self->classify_section ($thissection, $doc_obj, $edit_mode);
    8080    $thissection = $doc_obj->get_next_section ($thissection);
    8181    }
     
    8484sub classify_section {
    8585    my $self = shift (@_);
    86     my ($section, $doc_obj) = @_;
     86    my ($section, $doc_obj, $edit_mode) = @_;
    8787
    8888    my $doc_OID = $doc_obj->get_OID();
     89
     90    if ($edit_mode eq "delete") {
     91    $self->oid_hash_delete("$doc_OID$section",'list');
     92    return;
     93    }
    8994
    9095    my $metavalue;
Note: See TracChangeset for help on using the changeset viewer.