diff options
Diffstat (limited to 'lib/VNDB/Util/LayoutHTML.pm')
-rw-r--r-- | lib/VNDB/Util/LayoutHTML.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/VNDB/Util/LayoutHTML.pm b/lib/VNDB/Util/LayoutHTML.pm index e9cc4c54..5bd55873 100644 --- a/lib/VNDB/Util/LayoutHTML.pm +++ b/lib/VNDB/Util/LayoutHTML.pm @@ -3,8 +3,9 @@ package VNDB::Util::LayoutHTML; use strict; use warnings; -use TUWF ':html'; +use TUWF ':html', 'uri_escape'; use Exporter 'import'; +use Encode 'decode_utf8'; use VNDB::Func; our @EXPORT = qw|htmlHeader htmlFooter|; @@ -114,7 +115,9 @@ sub _menu { } else { h2 mt '_menu_user'; div; - a href => '/u/login', mt '_menu_login'; br; + # 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}) : ''); + 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; end; |