diff options
author | Yorhel <git@yorhel.nl> | 2009-03-14 16:16:58 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2009-03-14 16:16:58 +0100 |
commit | c47a479253d16dba9653c9ce86f86849d0d5f03e (patch) | |
tree | 2e0461691895461367ea056bd4c76693af3ac079 /lib/VNDB/Util/FormHTML.pm | |
parent | 4a45377ab172b6f98b755db6139e1ee64df5aa5b (diff) |
Separated table for tag aliases + proper checking of unique aliases and names
Diffstat (limited to 'lib/VNDB/Util/FormHTML.pm')
-rw-r--r-- | lib/VNDB/Util/FormHTML.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/VNDB/Util/FormHTML.pm b/lib/VNDB/Util/FormHTML.pm index ecaf1183..b14f83fa 100644 --- a/lib/VNDB/Util/FormHTML.pm +++ b/lib/VNDB/Util/FormHTML.pm @@ -52,7 +52,6 @@ my %formerr_exeptions = ( noimage => 'Image must be in JPEG or PNG format', toolarge => 'Image is too large, only 500kB allowed', oneaday => 'You can only register one account from the same IP within 24 hours', - tagexists => 'A tag with the same name already exists in the database!', ); @@ -82,6 +81,13 @@ sub htmlFormError { li sprintf '%s: only %d characters allowed', $field, $rule if $type eq 'maxlength'; li sprintf '%s must be one of the following: %s', $field, join ', ', @$rule if $type eq 'enum'; li sprintf 'Wrong tag: %s', $rule if $type eq 'wrongtag'; + if($type eq 'tagexists') { + li; + lit $rule->{state} != 1 ? qq|Tag <a href="/g$rule->{id}">$rule->{name}</a> already exists!| + : qq|A tag <a href="/g$rule->{id}">with the same name</a> has been deleted in the past,| + .qq| please use <a href="/t/db">the discussion board</a> if you want it to be re-added.|; + end; + } li $rule->[1] if $type eq 'func' || $type eq 'regex'; if($type eq 'template') { li sprintf |