summaryrefslogtreecommitdiff
path: root/lib/VNDB/DB/Tags.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2010-01-11 09:38:19 +0100
committerYorhel <git@yorhel.nl>2010-01-11 09:38:19 +0100
commit0e7f85a23414f0ef634f31af639548eabcb68c03 (patch)
tree76a816f0b78798376d6f5ce3d5f7a2beecc31d8e /lib/VNDB/DB/Tags.pm
parent402e350d968f3a9753e20f665edf000530c654c9 (diff)
Tags: Another bugfix in the parent tags SQL query and display
It should work perfectly now...
Diffstat (limited to 'lib/VNDB/DB/Tags.pm')
-rw-r--r--lib/VNDB/DB/Tags.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNDB/DB/Tags.pm b/lib/VNDB/DB/Tags.pm
index 478cd91c..2c1b287f 100644
--- a/lib/VNDB/DB/Tags.pm
+++ b/lib/VNDB/DB/Tags.pm
@@ -104,7 +104,7 @@ sub dbTagTree {
JOIN tags t ON !s
WHERE tt.lvl > 0
AND t.state = 2
- ) SELECT id, parent, name, c_vns FROM tagtree ORDER BY name|, $lvl,
+ ) SELECT DISTINCT id, parent, name, c_vns FROM tagtree ORDER BY name|, $lvl,
$id ? {'id = ?' => $id} : {'NOT EXISTS(SELECT 1 FROM tags_parents WHERE tag = id)' => 1, 'state = 2' => 1},
!$back ? ('tp.parent = tt.id', 't.id = tp.tag') : ('tp.tag = tt.id', 't.id = tp.parent')
);