Changeset 1608


Ignore:
Timestamp:
2000-10-20T16:35:06+13:00 (24 years ago)
Author:
nzdl
Message:

Inserted an ugly hack into the Hierarchy classifier to mask a bug that's
been lurking about for a while. One day I'll fix it properly... maybe.

File:
1 edited

Legend:

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

    r1483 r1608  
    154154    if ((defined $self->{'descriptorlist'}->{$metaelement}) &&
    155155        (defined $self->{'locatorlist'}->{$self->{'descriptorlist'}->{$metaelement}})) {
    156 
    157156        push (@{$self->{'locatorlist'}->{$self->{'descriptorlist'}->{$metaelement}}->{'contents'}},
    158157          [$doc_OID, $sortmeta]);
     
    168167    my $classifyinfo = $self->get_entry ($self->{'title'}, "VList", "Invisible");
    169168    foreach $OID (keys (%$list)) {
     169
    170170    my $tempinfo = $self->get_OID_entry ($OID, $classifyinfo, $list->{$OID}->{'title'}, "VList");
    171171
     
    190190    $OID = "" unless defined $OID;
    191191    $OID =~ s/^\.+//;
    192    
     192
    193193    my ($headOID, $tailOID) = $OID =~ /^(\d+)(.*)$/;
    194194    $tailOID = "" unless defined $tailOID;
    195 
    196195
    197196    if (!defined $headOID) {
     
    204203   
    205204    # add entries to the contains list until we have one for headOID
    206     while (scalar(@{$classifyinfo->{'contains'}}) < $headOID) {
     205    #### the +10 is a hack that works but I'm not completely sure why
     206    #### and don't have time to delve deeper. one day someone should
     207    #### fix this ;-) -- Stefan
     208    while (scalar(@{$classifyinfo->{'contains'}}) <= ($headOID+10)) {
    207209    push (@{$classifyinfo->{'contains'}}, $self->get_entry("", $classifytype));
    208210    }
     
    214216    my $self = shift (@_);
    215217    my ($title, $childtype, $thistype) = @_;
    216    
     218
    217219    # organise into classification structure
    218220    my %classifyinfo = ('childtype'=>$childtype,
Note: See TracChangeset for help on using the changeset viewer.