Changeset 27563 for main/trunk/greenstone2/perllib/lucenebuildproc.pm
- Timestamp:
- 2013-06-06T11:29:54+12:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/lucenebuildproc.pm
r27358 r27563 78 78 } 79 79 80 sub set_sections_sort_on_document_metadata { 81 my $self= shift (@_); 82 my ($index_type) = @_; 83 84 $self->{'sections_sort_on_document_metadata'} = $index_type; 85 } 86 80 87 sub set_sortfields { 81 88 my $self = shift (@_); … … 360 367 361 368 my @section_metadata = @{$doc_obj->get_metadata ($section, $submeta)}; 369 if ($section ne $doc_obj->get_top_section() && defined ($self->{'sections_sort_on_document_metadata'})) { 370 if ($self->{'sections_sort_on_document_metadata'} eq "always" || ( scalar(@section_metadata) == 0 && $self->{'sections_sort_on_document_metadata'} eq "unless_section_metadata_exists")) { 371 push (@section_metadata, @{$doc_obj->get_metadata ($doc_obj->get_top_section(), $submeta)}); 372 } 373 } 362 374 push (@metadata_list, @section_metadata); 363 375 } … … 365 377 foreach my $item (@metadata_list) { 366 378 &ghtml::htmlsafe($item); 367 $new_text .= "$item 379 $new_text .= "$item"; 368 380 } 369 381 if ($new_text =~ /\S/) {
Note:
See TracChangeset
for help on using the changeset viewer.