Changeset 6974


Ignore:
Timestamp:
2004-03-09T12:15:17+13:00 (20 years ago)
Author:
kjdon
Message:

put back some stuff used by AZCompactlist when it uses SectionList to classify a single section

File:
1 edited

Legend:

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

    r6970 r6974  
    6262sub classify {
    6363    my $self = shift (@_);
    64     my ($doc_obj) = @_;
     64    my ($doc_obj, @options) = @_;
    6565   
     66    # @options used by AZCompactList when is uses SectionList internally
    6667    # are we sorting the list??
    6768    my $nosort = 0;
     
    7071    }
    7172
    72     # do we want to put -section as an option for the classifier???
    73     #my $thissection = undef;
     73    my $thissection = undef;
    7474
    75     #my $option;
    76     #foreach $option (@options)
    77     #{
    78 #   if ($option =~ m/^section=(\d+)$/i)
    79 #   {
    80 #       $thissection = $1;
    81 #   }
    82 #    }
     75    my $option;
     76    foreach $option (@options)
     77    {
     78    if ($option =~ m/^section=(\d+)$/i)
     79    {
     80        $thissection = $1;
     81    }
     82    }
    8383
    8484    my $sortmeta = "";
     
    9595    }
    9696
    97  #   if (defined $thissection) {
    98 #   $self->classify_section($thissection, $doc_obj, $sortmeta);
    99 #    } else   
    100  #   {
    101     $thissection = $doc_obj->get_next_section ($doc_obj->get_top_section());
    102     while (defined $thissection) {
    103     $self->classify_section($thissection, $doc_obj, $nosort, $sortmeta);
    104     $thissection = $doc_obj->get_next_section ($thissection);
     97    if (defined $thissection) {
     98    # just classify the one section
     99    $self->classify_section($thissection, $doc_obj, $sortmeta, $nosort);
     100    } else   
     101    {
     102    $thissection = $doc_obj->get_next_section ($doc_obj->get_top_section());
     103    while (defined $thissection) {
     104        $self->classify_section($thissection, $doc_obj, $sortmeta, $nosort);
     105        $thissection = $doc_obj->get_next_section ($thissection);
     106    }
    105107    }
    106     #}
    107108}
    108109
    109110sub classify_section {
    110111    my $self = shift (@_);
    111     my ($section, $doc_obj, $nosort, $sortmeta) = @_;
     112    my ($section, $doc_obj, $sortmeta, $nosort) = @_;
    112113
    113114    my $doc_OID = $doc_obj->get_OID();
Note: See TracChangeset for help on using the changeset viewer.