summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2019-10-11 10:15:21 +0200
committerYorhel <git@yorhel.nl>2019-10-11 10:15:21 +0200
commitd4143f6b95554ff4e768b1bfefac68f890912fd2 (patch)
treee8c40ee2891281e64bb2c1093587e04c96957ce5 /lib
parente0f0fec01dd6cb8b0cc2b2dc85ad05a6cd990488 (diff)
Two rewards-related bug fixes
Diffstat (limited to 'lib')
-rw-r--r--lib/VNDB/Util/CommonHTML.pm4
-rw-r--r--lib/VNWeb/User/Edit.pm2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/VNDB/Util/CommonHTML.pm b/lib/VNDB/Util/CommonHTML.pm
index 72febd63..0a09655c 100644
--- a/lib/VNDB/Util/CommonHTML.pm
+++ b/lib/VNDB/Util/CommonHTML.pm
@@ -207,9 +207,9 @@ sub revheader { # type, obj
b "Revision $obj->{rev}";
txt ' (';
a href => "/$type$obj->{id}.$obj->{rev}/edit", 'revert to';
- if($obj->{requester} && $self->authCan('board')) {
+ if($obj->{user_id} && $self->authCan('board')) {
lit ' / ';
- a href => "/t/u$obj->{requester}/new?title=Regarding%20$type$obj->{id}.$obj->{rev}", 'msg user';
+ a href => "/t/u$obj->{user_id}/new?title=Regarding%20$type$obj->{id}.$obj->{rev}", 'msg user';
}
txt ')';
br;
diff --git a/lib/VNWeb/User/Edit.pm b/lib/VNWeb/User/Edit.pm
index 1083dc39..936a65e2 100644
--- a/lib/VNWeb/User/Edit.pm
+++ b/lib/VNWeb/User/Edit.pm
@@ -25,7 +25,7 @@ my $FORM = form_compile in => {
support_can => { anybool => 1 },
support_enabled => { anybool => 1 },
uniname_can => { anybool => 1 },
- uniname => { required => 0, default => '', length => [ 2, 15 ] },
+ uniname => { required => 0, default => '', regex => qr/^.{2,15}$/ }, # Use regex to check length, HTML5 `maxlength` attribute counts UTF-16 code units...
pubskin_can => { anybool => 1 },
pubskin_enabled => { anybool => 1 },