diff options
author | Yorhel <git@yorhel.nl> | 2009-03-14 13:57:57 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2009-03-14 13:57:57 +0100 |
commit | 801230abf44ae90dce18f54852cb550435b35142 (patch) | |
tree | 139f2264d0fea09a680119f216c5be6cf28c8a9a /lib/VNDB | |
parent | f7dc3ee5d6673250304de925088f29da11708b8b (diff) |
Handling of g# in Multi and bb2html, and IRC notify on tag creation
Diffstat (limited to 'lib/VNDB')
-rw-r--r-- | lib/VNDB/Func.pm | 2 | ||||
-rw-r--r-- | lib/VNDB/Handler/Tags.pm | 8 |
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'); } } |