2006.06.01 Thursday | 03:42

  カテゴリツリーの横の件数表示削除 ふるいむかし

lib\sb\Content.pm

sub _category_tree { # カテゴリーツリー
	my %param = (
		'cat'    => [],
		'branch' => undef,
		'num'    => {},
		'no_num' => undef,
		@_
	);
	my $list = '';
	foreach my $cat ( @{$param{'cat'}} ) {
		next if ($cat->get_option('list') == 1);
		next if (!defined($param{'branch'}) and $cat->main ne '');
		next if ( defined($param{'branch'}) and $cat->main ne $param{'branch'});
		my $text = $cat->text; # code by Fuco. Thanks!
		$text = ($text ne '') ? ' title="' . sb::Text->entitize($text) . '"' : '';
		$list .= '<li><a href="' . $cat->cat_url . '"' . $text . '>' . $cat->name . '</a>';
#		$list .= ' (' . int($param{'num'}->{$cat->id}) . ')' if (!$param{'no_num'});
		if ($cat->sub ne '') {
			$list .= "\n" . '<ul>';
			$list .= &_category_tree(
				'cat'    => $param{'cat'},
				'branch' => $cat->id,
				'num'    => $param{'num'},
				'no_num' => $param{'no_num'},
			);
			$list .= '</ul>';
		}
		$list .= '</li>' . "\n";
	}
	return($list);
}