diff options
author | Yorhel <git@yorhel.nl> | 2009-02-22 13:46:03 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2009-02-22 13:46:03 +0100 |
commit | e0390c46122dd2d4d14b7b7f2eeee27b679c133e (patch) | |
tree | 1a6956d0dc14ebd907c00af99ef86da1b007f9fc /lib/VNDB/DB/Tags.pm | |
parent | 8e8bf25368ce0e8371e3aa45ce75c560819ed92b (diff) |
Renaming tags.aliases to tags.alias
Consistent with all other aliases field
Diffstat (limited to 'lib/VNDB/DB/Tags.pm')
-rw-r--r-- | lib/VNDB/DB/Tags.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/VNDB/DB/Tags.pm b/lib/VNDB/DB/Tags.pm index f7151431..fb8ebca5 100644 --- a/lib/VNDB/DB/Tags.pm +++ b/lib/VNDB/DB/Tags.pm @@ -28,7 +28,7 @@ sub dbTagGet { ); my($r, $np) = $self->dbPage(\%o, q| - SELECT t.id, t.meta, t.name, t.aliases, t.description + SELECT t.id, t.meta, t.name, t.alias, t.description FROM tags t !W ORDER BY !s|, @@ -58,7 +58,7 @@ sub dbTagEdit { my($self, $id, %o) = @_; $self->dbExec('UPDATE tags !H WHERE id = ?', - { map { +"$_ = ?" => $o{$_} } qw|name meta aliases description| }, $id); + { map { +"$_ = ?" => $o{$_} } qw|name meta alias description| }, $id); $self->dbExec('DELETE FROM tags_parents WHERE tag = ?', $id); $self->dbExec('INSERT INTO tags_parents (tag, parent) VALUES (?, ?)', $id, $_) for(@{$o{parents}}); $self->dbExec('DELETE FROM tags_vn WHERE tag = ?', $id) if $o{meta}; @@ -69,8 +69,8 @@ sub dbTagEdit { # returns the id of the new tag sub dbTagAdd { my($self, %o) = @_; - my $id = $self->dbRow('INSERT INTO tags (name, meta, aliases, description) VALUES (!l) RETURNING id', - [ map $o{$_}, qw|name meta aliases description| ] + my $id = $self->dbRow('INSERT INTO tags (name, meta, alias, description) VALUES (!l) RETURNING id', + [ map $o{$_}, qw|name meta alias description| ] )->{id}; $self->dbExec('INSERT INTO tags_parents (tag, parent) VALUES (?, ?)', $id, $_) for(@{$o{parents}}); return $id; |