Changeset 8445
- Timestamp:
- 2004-11-03T17:02:08+13:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/classify.pm
r8361 r8445 184 184 185 185 # don't want empty classifications 186 return if ( $remove_empty_classifications && &check_contents ($classifyinfo) == 0);186 return if (&check_contents ($classifyinfo, $remove_empty_classifications) == 0 && $remove_empty_classifications); 187 187 188 188 $OID = $classifyinfo->{'classifyOID'} if defined ($classifyinfo->{'classifyOID'}); … … 260 260 261 261 sub check_contents { 262 my ($classifyinfo) = @_; 262 my ($classifyinfo,$remove_empty_classifications) = @_; 263 $remove_empty_classifications = 0 unless ($remove_empty_classifications); 263 264 my $num_leaf_docs = 0; 264 265 my $sub_num_leaf_docs = 0; … … 274 275 $num_leaf_docs += $sub_num_leaf_docs; 275 276 } else { 276 # section contains no books so we want to remove 277 # it from its parents contents 278 $content = undef; 277 if ($remove_empty_classifications){ 278 # section contains no books so we want to remove 279 # it from its parents contents 280 $content = undef; 281 } 279 282 } 280 283 }
Note:
See TracChangeset
for help on using the changeset viewer.