summaryrefslogtreecommitdiff
path: root/lib/VNDB/Func.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2011-02-21 10:19:48 +0100
committerYorhel <git@yorhel.nl>2011-02-21 10:19:48 +0100
commitacdbb717bb426d237efb7195fc8658eee64d107b (patch)
tree14c59ff7491b4b077baeb5dd4dde05341ddaff43 /lib/VNDB/Func.pm
parent0d8e97158208681c63d934e0c75472d8f5eb11c8 (diff)
chardb: char-by-trait lookup + trait usage count + tag-code sharing
I'll have to optimize the updating of traits_chars as soon as I have some data to test with. Also renamed tags.c_vns to c_items, to have it share the same name as traits.c_items. This makes it a lot easier to re-use code for both tags and traits, such as what I did with dbTagTree/dbTraitTree -> dbTTTree and the childtags() and parenttags() functions.
Diffstat (limited to 'lib/VNDB/Func.pm')
-rw-r--r--lib/VNDB/Func.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VNDB/Func.pm b/lib/VNDB/Func.pm
index 20ade586..edb6e3aa 100644
--- a/lib/VNDB/Func.pm
+++ b/lib/VNDB/Func.pm
@@ -147,7 +147,7 @@ sub childtags {
for my $p (sort { @{$b->{'sub'}} <=> @{$a->{'sub'}} } @{$t->{childs}}) {
li;
a href => "/$type$p->{id}", $p->{name};
- b class => 'grayedout', " ($p->{c_vns})" if $type eq 'g' && $p->{c_vns};
+ b class => 'grayedout', " ($p->{c_items})" if $p->{c_items};
end, next if !@{$p->{'sub'}};
ul;
for (0..$#{$p->{'sub'}}) {
@@ -155,7 +155,7 @@ sub childtags {
li;
txt '> ';
a href => "/$type$p->{sub}[$_]{id}", $p->{'sub'}[$_]{name};
- b class => 'grayedout', " ($p->{sub}[$_]{c_vns})" if $type eq 'g' && $p->{'sub'}[$_]{c_vns};
+ b class => 'grayedout', " ($p->{sub}[$_]{c_items})" if $p->{'sub'}[$_]{c_items};
end;
}
if(@{$p->{'sub'}} > 6) {