summaryrefslogtreecommitdiff
path: root/lib/VNDB
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VNDB')
-rw-r--r--lib/VNDB/Func.pm2
-rw-r--r--lib/VNDB/Handler/Tags.pm8
2 files changed, 7 insertions, 3 deletions
diff --git a/lib/VNDB/Func.pm b/lib/VNDB/Func.pm
index 952f214c..7556d1a9 100644
--- a/lib/VNDB/Func.pm
+++ b/lib/VNDB/Func.pm
@@ -155,7 +155,7 @@ sub bb2html {
next;
} elsif(!grep(/url/, @open) && (
s{^(.*[^\w]|)([tdvpr][1-9][0-9]*)\.([1-9][0-9]*)([^\w].*|)$}{$e->($1).qq|<a href="/$2.$3">$2.$3</a>|.$e->($4)}e ||
- s{^(.*[^\w]|)([tduvpr][1-9][0-9]*)([^\w].*|)$}{$e->($1).qq|<a href="/$2">$2</a>|.$e->($3)}e)) {
+ s{^(.*[^\w]|)([tdvprug][1-9][0-9]*)([^\w].*|)$}{$e->($1).qq|<a href="/$2">$2</a>|.$e->($3)}e)) {
$length += length $lit;
last if $maxlength && $length > $maxlength;
$result .= $_;
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');
}
}