Changeset 6975


Ignore:
Timestamp:
2004-03-09T14:03:01+13:00 (20 years ago)
Author:
kjdon
Message:

a few tiny changes

File:
1 edited

Legend:

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

    r6968 r6975  
    2323#
    2424###########################################################################
    25 
    2625# classifier plugin for sorting alphabetically
    2726# options are:
    28 #
    29 # metadata=Metaname -- all documents with Metaname metadata
    30 #                      will be included in list, list will be sorted
    31 #                      by this element.
    32 # buttonname=Title  -- (optional) the title field for this classification.
    33 #                      if not included title field will be Metaname.
    34 # mingroup=Num      -- (optional) the smallest value that will cause
    35 #                      a group in the hierarchy to form.
    36 # minnesting=Num    -- (optional) the smallest value that will cause a
    37 #              list to converted into nested list
    38 # mincompact=Num    -- (optional) used in compact list
    39 # maxcompact=Num    -- (optional) used in compact list
    40 # doclevel=top|section -- (optional) level to process document at.
    41 # onlyfirst         -- (optional) control whether all or only first
    42 #                      metadata value used from array of metadata
     27
    4328package AZCompactList;
    4429
     
    5843my $arguments =
    5944    [ { 'name' => "metadata",
    60     'desc' => "{AZList.metadata}",
     45    'desc' => "{AZCompactList.metadata}",
    6146    'type' => "metadata",
    6247    'reqd' => "yes" },
     
    117102    'desc' => "{AZCompactList.recopt}",
    118103    'type' => "flag",
    119     'deft' => "",
    120104    'reqd' => "no" } ];
    121105
     
    174158    }
    175159
    176     if (!defined $metaname) {
     160    if (!$metaname) {
    177161    my $outhandle = $self->{'outhandle'};
    178162    print $outhandle "AZCompactList used with no metadata name to classify by\n";
     
    302286
    303287        my $formatted_metavalue = $metavalue;
    304 
    305         if ($self->{'metaname'} =~ m/^Creator(:.*)?$/)
    306         {
    307             &sorttools::format_string_name_english (\$formatted_metavalue);
    308         }
    309         else
    310         {
    311             &sorttools::format_string_english (\$formatted_metavalue);
    312         }
     288        $formatted_metavalue = $self->format_metadata_for_sorting($self->{'metaname'}, $formatted_metavalue, $doc_obj);
    313289       
    314290        #### prefix-str
     
    455431            if (!$formatted_node) {next;}
    456432        }
    457 
     433       
     434        #$formatted_node = $self->format_metadata_for_sorting($self->{'metaname'}, $formatted_node, $doc_obj);
     435        # should be using the above, but we have no doc obj any more
    458436        if ($self->{'metaname'} =~ m/^Creator(:.*)?$/)
    459437        {
Note: See TracChangeset for help on using the changeset viewer.