Changeset 2503


Ignore:
Timestamp:
2001-06-07T12:23:09+12:00 (23 years ago)
Author:
sjboddie
Message:

fixed a small bug in the datelist classifier that caused year ranges like
1999-1998 to appear in certain situations

File:
1 edited

Legend:

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

    r1839 r2503  
    120120    # top level
    121121    my $childtype = "HList";
    122     if (scalar (@$classlistref) <= 20) {$childtype = "DateList";}
     122    if (scalar (@$classlistref) <= 39) {$childtype = "DateList";}
    123123    my $classifyinfo = $self->get_entry ("Date", $childtype, "Invisible");
    124124
    125     # don't need to do any splitting if there are less than 20 classifications
    126     if ((scalar @$classlistref) <= 20) {
     125    # don't need to do any splitting if there are less than 39 (max + min -1) classifications
     126    if ((scalar @$classlistref) <= 39) {
    127127    foreach $subOID (@$classlistref) {
    128128        push (@{$classifyinfo->{'contains'}}, {'OID'=>$subOID});
     
    199199    # add final OIDs to last sub-classification if there aren't many otherwise
    200200    # add final sub-classification
    201     if (scalar (@currentOIDs) < $min) {
     201    if ((scalar (@currentOIDs) < $min) && (scalar (@currentOIDs) > 0)) {
    202202    my ($newkey) = $lastkey =~ /^(\d\d\d\d)/;
    203203    @currentOIDs = (@{$compactedhash->{$lastkey}}, @currentOIDs);
Note: See TracChangeset for help on using the changeset viewer.