Changeset 6974
- Timestamp:
- 2004-03-09T12:15:17+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/classify/SectionList.pm
r6970 r6974 62 62 sub classify { 63 63 my $self = shift (@_); 64 my ($doc_obj ) = @_;64 my ($doc_obj, @options) = @_; 65 65 66 # @options used by AZCompactList when is uses SectionList internally 66 67 # are we sorting the list?? 67 68 my $nosort = 0; … … 70 71 } 71 72 72 # do we want to put -section as an option for the classifier??? 73 #my $thissection = undef; 73 my $thissection = undef; 74 74 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 } 83 83 84 84 my $sortmeta = ""; … … 95 95 } 96 96 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 } 105 107 } 106 #}107 108 } 108 109 109 110 sub classify_section { 110 111 my $self = shift (@_); 111 my ($section, $doc_obj, $ nosort, $sortmeta) = @_;112 my ($section, $doc_obj, $sortmeta, $nosort) = @_; 112 113 113 114 my $doc_OID = $doc_obj->get_OID();
Note:
See TracChangeset
for help on using the changeset viewer.