Changeset 2973
- Timestamp:
- 2002-02-19T22:15:04+13:00 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/classify/Hierarchy.pm
r2837 r2973 230 230 $classifyinfo->{'Title'} = $title; 231 231 $classifyinfo->{'classifytype'} = $classifytype; 232 232 233 return $classifyinfo; 233 234 } 234 235 235 236 $classifyinfo->{'contains'} = [] unless defined $classifyinfo->{'contains'}; 236 237 # add entries to the contains list until we have one for headOID 238 #### the +10 is a hack that works but I'm not completely sure why 239 #### and don't have time to delve deeper. one day someone should 240 #### fix this ;-) -- Stefan 241 while (scalar(@{$classifyinfo->{'contains'}}) <= ($headOID+10)) { 237 238 my $offset = 0; 239 foreach $thing (@{$classifyinfo->{'contains'}}) { 240 $offset ++ if defined $thing->{'OID'}; 241 } 242 243 while (scalar(@{$classifyinfo->{'contains'}}) < ($headOID+$offset)) { 242 244 push (@{$classifyinfo->{'contains'}}, $self->get_entry("", $classifytype)); 243 245 } 244 246 245 return $self->get_OID_entry ($tailOID, $classifyinfo->{'contains'}->[($headOID -1)], $title, $classifytype);247 return $self->get_OID_entry ($tailOID, $classifyinfo->{'contains'}->[($headOID+$offset-1)], $title, $classifytype); 246 248 } 247 249
Note:
See TracChangeset
for help on using the changeset viewer.