summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2011-02-05 16:58:18 +0100
committerYorhel <git@yorhel.nl>2011-02-05 16:58:18 +0100
commit99b0bb54556d4300676056e8afe606d859e6417b (patch)
tree04f91570026884fcac24369a2ca92e7bc8c46684 /lib
parentca3505999d11a66591dd8529b492c9b060b89f65 (diff)
Properly save tag category when adding a new tag
Diffstat (limited to 'lib')
-rw-r--r--lib/VNDB/DB/Tags.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VNDB/DB/Tags.pm b/lib/VNDB/DB/Tags.pm
index d2269e02..a4451f98 100644
--- a/lib/VNDB/DB/Tags.pm
+++ b/lib/VNDB/DB/Tags.pm
@@ -140,8 +140,8 @@ sub dbTagEdit {
# returns the id of the new tag
sub dbTagAdd {
my($self, %o) = @_;
- my $id = $self->dbRow('INSERT INTO tags (name, meta, description, state, addedby) VALUES (!l, ?) RETURNING id',
- [ map $o{$_}, qw|name meta description state| ], $o{addedby}||$self->authInfo->{id}
+ my $id = $self->dbRow('INSERT INTO tags (name, meta, description, state, cat, addedby) VALUES (!l, ?) RETURNING id',
+ [ map $o{$_}, qw|name meta description state cat| ], $o{addedby}||$self->authInfo->{id}
)->{id};
$self->dbExec('INSERT INTO tags_parents (tag, parent) VALUES (?, ?)', $id, $_) for(@{$o{parents}});
$self->dbExec('INSERT INTO tags_aliases (tag, alias) VALUES (?, ?)', $id, $_) for (@{$o{aliases}});