summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler/Tags.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VNDB/Handler/Tags.pm')
-rw-r--r--lib/VNDB/Handler/Tags.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/VNDB/Handler/Tags.pm b/lib/VNDB/Handler/Tags.pm
index 8e4ada7a..2d25efc8 100644
--- a/lib/VNDB/Handler/Tags.pm
+++ b/lib/VNDB/Handler/Tags.pm
@@ -250,8 +250,12 @@ sub tagedit {
if(!$frm->{_err}) {
$frm->{meta} = $frm->{meta} ? 1 : 0;
$frm->{parents} = [ split / /, $frm->{parents} ];
- $self->dbTagEdit($tag, %$frm, upddate => $frm->{state} == 2 && $t->{state} != 2) if $tag;
- $tag = $self->dbTagAdd(%$frm) if !$tag;
+ if(!$tag) {
+ $tag = $self->dbTagAdd(%$frm);
+ $self->multiCmd("ircnotify g$tag");
+ } else {
+ $self->dbTagEdit($tag, %$frm, upddate => $frm->{state} == 2 && $t->{state} != 2);
+ }
$self->resRedirect("/g$tag", 'post');
}
}