Changeset 33902

Show
Ignore:
Timestamp:
04.02.2020 13:05:30 (2 weeks ago)
Author:
kjdon
Message:

pass in new casefold and accentfold options to format_metadata_for_sorting

Location:
main/trunk/greenstone2/perllib/classify
Files:
7 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/classify/AZCompactList.pm

    r29476 r33902  
    274274            $formatted_metavalue = $metavalue; 
    275275        } else { 
    276             $formatted_metavalue = &sorttools::format_metadata_for_sorting($self->{'metadata'},  $metavalue, $doc_obj); 
     276            $formatted_metavalue = &sorttools::format_metadata_for_sorting($self->{'metadata'},  $metavalue, $doc_obj, $self->{'casefold_metadata_for_sorting'}, $self->{'accentfold_metadata_for_sorting'}); 
    277277        } 
    278278         
     
    451451        } 
    452452 
    453         $formatted_node = &sorttools::format_metadata_for_sorting($self->{'metadata'}, $formatted_node) unless $self->{'no_metadata_formatting'}; 
     453        $formatted_node = &sorttools::format_metadata_for_sorting($self->{'metadata'}, $formatted_node, undef,  $self->{'casefold_metadata_for_sorting'}, $self->{'accentfold_metadata_for_sorting'}) unless $self->{'no_metadata_formatting'}; 
    454454 
    455455        # In case our formatted string is empty... 
  • main/trunk/greenstone2/perllib/classify/AZList.pm

    r23116 r33902  
    157157     
    158158     
    159     $metavalue = &sorttools::format_metadata_for_sorting($metaname, $metavalue, $doc_obj) unless $self->{'no_metadata_formatting'}; 
     159    $metavalue = &sorttools::format_metadata_for_sorting($metaname, $metavalue, $doc_obj, $self->{'casefold_metadata_for_sorting'}, $self->{'accentfold_metadata_for_sorting'}) unless $self->{'no_metadata_formatting'}; 
    160160     
    161161    if (defined $self->{'list'}->{$doc_OID}) { 
  • main/trunk/greenstone2/perllib/classify/AZSectionList.pm

    r33477 r33902  
    109109    } 
    110110     
    111     $metavalue = &sorttools::format_metadata_for_sorting($metaname, $metavalue, $doc_obj) unless $self->{'no_metadata_formatting'}; 
     111    $metavalue = &sorttools::format_metadata_for_sorting($metaname, $metavalue, $doc_obj, $self->{'casefold_metadata_for_sorting'}, $self->{'accentfold_metadata_for_sorting'}) unless $self->{'no_metadata_formatting'}; 
    112112    if (defined $self->{'list'}->{"$doc_OID.$section"}) { 
    113113        my $outhandle = $self->{'outhandle'}; 
  • main/trunk/greenstone2/perllib/classify/DateList.pm

    r27308 r33902  
    153153    if (defined $self->{'sort'} && $self->{'sort'} ne "") { 
    154154    $sort_other = $doc_obj->get_metadata_element ($doc_obj->get_top_section(), $self->{'sort'}); 
    155     $sort_other = &sorttools::format_metadata_for_sorting($self->{'sort'}, $sort_other, $doc_obj) unless $self->{'no_metadata_formatting'}; 
     155    $sort_other = &sorttools::format_metadata_for_sorting($self->{'sort'}, $sort_other, $doc_obj, $self->{'casefold_metadata_for_sorting'}, $self->{'accentfold_metadata_for_sorting'}) unless $self->{'no_metadata_formatting'}; 
    156156    } 
    157157     
  • main/trunk/greenstone2/perllib/classify/Hierarchy.pm

    r23116 r33902  
    168168        $sortmeta = $doc_obj->get_metadata_element($doc_obj->get_top_section(), $self->{'sort'}); 
    169169        if (defined $sortmeta && !$self->{'no_metadata_formatting'}) { 
    170         $sortmeta = &sorttools::format_metadata_for_sorting($self->{'sort'}, $sortmeta, $doc_obj); 
     170        $sortmeta = &sorttools::format_metadata_for_sorting($self->{'sort'}, $sortmeta, $doc_obj, $self->{'casefold_metadata_for_sorting'}, $self->{'accentfold_metadata_for_sorting'}); 
    171171        } 
    172172    } 
  • main/trunk/greenstone2/perllib/classify/SectionList.pm

    r23116 r33902  
    8989        $sortmeta = $doc_obj->get_metadata_element($doc_obj->get_top_section(), $self->{'sort'}); 
    9090        if (defined $sortmeta && !$self->{'no_metadata_formatting'}) { 
    91         $sortmeta = &sorttools::format_metadata_for_sorting($self->{'sort'}, $sortmeta, $doc_obj); 
     91        $sortmeta = &sorttools::format_metadata_for_sorting($self->{'sort'}, $sortmeta, $doc_obj, $self->{'casefold_metadata_for_sorting'}, $self->{'accentfold_metadata_for_sorting'}); 
    9292        } 
    9393    } 
     
    146146    # sorting on the classification metadata 
    147147    # do the same formatting on the meta value as for sort meta 
    148     $metavalue = &sorttools::format_metadata_for_sorting($metaname, $metavalue, $doc_obj) unless $self->{'no_metadata_formatting'}; 
     148    $metavalue = &sorttools::format_metadata_for_sorting($metaname, $metavalue, $doc_obj, $self->{'casefold_metadata_for_sorting'}, $self->{'accentfold_metadata_for_sorting'}) unless $self->{'no_metadata_formatting'}; 
    149149    $self->{'list'}->{"$doc_OID.$section"} = $metavalue; 
    150150    } 
  • main/trunk/greenstone2/perllib/classify/SimpleList.pm

    r23116 r33902  
    191191        $sortmeta = $doc_obj->get_metadata_element($doc_obj->get_top_section(), $self->{'sort'}); 
    192192        if (defined $sortmeta && !$self->{'no_metadata_formatting'}) { 
    193         $sortmeta = &sorttools::format_metadata_for_sorting($self->{'sort'}, $sortmeta, $doc_obj); 
     193        $sortmeta = &sorttools::format_metadata_for_sorting($self->{'sort'}, $sortmeta, $doc_obj, $self->{'casefold_metadata_for_sorting'}, $self->{'accentfold_metadata_for_sorting'}); 
    194194        } 
    195195    } 
     
    199199    # we add to the list based on metadata value 
    200200    # but we need to do the same formatting as for sort value 
    201     ($metavalue) = &sorttools::format_metadata_for_sorting($metaname, $metavalue, $doc_obj) unless $self->{'no_metadata_formatting'}; 
     201    ($metavalue) = &sorttools::format_metadata_for_sorting($metaname, $metavalue, $doc_obj, $self->{'casefold_metadata_for_sorting'}, $self->{'accentfold_metadata_for_sorting'}) unless $self->{'no_metadata_formatting'}; 
    202202    $self->{'list'}->{$doc_OID} = $metavalue; 
    203203    }