Changeset 9519


Ignore:
Timestamp:
2005-03-31T11:43:50+12:00 (19 years ago)
Author:
mdewsnip
Message:

What's all this hard-wired sorting by Date business? (Meant the -sort option was ignored for AZCompactSectionList).

Location:
trunk/gsdl/perllib/classify
Files:
2 edited

Legend:

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

    r9461 r9519  
    336336        }
    337337    }
    338     # what is this for??????
    339     my $date = $doc_obj->get_metadata_element($thissection,"Date");
    340     $self->{'reclassify'}->{$full_doc_OID} = [$doc_obj,$date];
     338
     339    # This is used in reclassify below for AZCompactSectionList
     340    my $sortmeta = $doc_obj->get_metadata_element($thissection, $self->{'sortname'});
     341    $self->{'reclassify'}->{$full_doc_OID} = [$doc_obj,$sortmeta];
    341342    }
    342343}
     
    524525    if (exists $self->{'classifiers'}->{$node_name})
    525526    {
    526         my ($doc_obj,$date) = @{$self->{'reclassify'}->{$doc_OID}};
     527        my ($doc_obj, $sortmeta) = @{$self->{'reclassify'}->{$doc_OID}};
    527528
    528529        # record the metadata value offset temporarily, so eg AZList can
    529530        # get the correct metadata value (for multi-valued metadata fields)
    530531        $doc_obj->{'mdoffset'}=$mdoffset;
    531 
    532         ## date appears to not be used in classifier call ####
    533532
    534533        if ($doc_OID =~ m/^[^\.]*\.([\d\.]+)$/)
     
    542541            # classify can't handle multi-level section
    543542            $self->{'classifiers'}->{$node_name}->{'classifyobj'}
    544             ->classify_section($section, $doc_obj, $date);
     543            ->classify_section($section, $doc_obj, $sortmeta);
    545544        }
    546545        }
  • trunk/gsdl/perllib/classify/AZCompactSectionList.pm

    r9063 r9519  
    117117# buttonname is also used for the node's title
    118118        push @args, ("-buttonname", "$metavalue");
    119         push @args, ("-sort", "Date");
     119        push @args, ("-sort", $self->{'sortname'});
    120120
    121121        if ($doclevel =~ m/^top(level)?/i)
     
    198198        if ($metavalue =~ m/^$resafe_node_name$/i)
    199199        {
    200         my ($doc_obj,$date) = @{$self->{'reclassify'}->{$doc_OID}};
    201 
    202         ## date appears to not be used in classifier call ####
     200        my ($doc_obj, $sortmeta) = @{$self->{'reclassify'}->{$doc_OID}};
    203201
    204202        # SECTIONFIX?  section must include multiple levels, e.g. '1.12'
     
    209207            # SECTIONFIX? classify can't handle multi-level section
    210208            #->classify($doc_obj, "Section=$1");
    211             ->classify_section($1, $doc_obj, $date);
     209            ->classify_section($1, $doc_obj, $sortmeta);
    212210        }
    213211        else
Note: See TracChangeset for help on using the changeset viewer.