diff options
author | Yorhel <git@yorhel.nl> | 2015-09-20 10:48:50 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2015-09-20 10:48:50 +0200 |
commit | 83b62a3f95a420134320955d21c54d46bc64e94c (patch) | |
tree | e7ec800e46ea6d56f1bce7c6320ca41d3fca6a08 /lib/VNDB/Util | |
parent | 940b089ea5f02ef9bc80b4b82c320c4e9d2dbb34 (diff) |
Use the new reqQuery() + update usage of reqPath() for TUWF 1.0
Diffstat (limited to 'lib/VNDB/Util')
-rw-r--r-- | lib/VNDB/Util/Auth.pm | 2 | ||||
-rw-r--r-- | lib/VNDB/Util/LayoutHTML.pm | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/VNDB/Util/Auth.pm b/lib/VNDB/Util/Auth.pm index d6a35d1d..a1c6cf08 100644 --- a/lib/VNDB/Util/Auth.pm +++ b/lib/VNDB/Util/Auth.pm @@ -200,7 +200,7 @@ sub authGetCode { # form-id is not given, the path of the current requests is used. sub authCheckCode { my $self = shift; - my $id = shift || '/'.$self->reqPath(); + my $id = shift || $self->reqPath(); my $code = shift || $self->reqParam('formcode'); return _incorrectcode($self) if !$code || $code !~ qr/^[0-9a-f]{16}$/; my $time = time; diff --git a/lib/VNDB/Util/LayoutHTML.pm b/lib/VNDB/Util/LayoutHTML.pm index 5bd55873..e041960a 100644 --- a/lib/VNDB/Util/LayoutHTML.pm +++ b/lib/VNDB/Util/LayoutHTML.pm @@ -115,8 +115,7 @@ sub _menu { } else { h2 mt '_menu_user'; div; - # XXX: Using %ENV here is ugly, this should be abstracted in TUWF. - my $ref = uri_escape '/'.$self->reqPath().($ENV{QUERY_STRING} ? '?'.decode_utf8($ENV{QUERY_STRING}) : ''); + my $ref = uri_escape $self->reqPath().$self->reqQuery(); a href => "/u/login?ref=$ref", mt '_menu_login'; br; a href => '/u/newpass', mt '_menu_newpass'; br; a href => '/u/register', mt '_menu_register'; br; |