From: Michal Vaner Date: Sat, 30 Aug 2008 09:33:34 +0000 (+0200) Subject: Redirection from login works again X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=74e68425e58835cadb0f6949648e6b2740945091;p=pciids.git Redirection from login works again --- diff --git a/PciIds/Html/Users.pm b/PciIds/Html/Users.pm index 317702f..8cab64e 100644 --- a/PciIds/Html/Users.pm +++ b/PciIds/Html/Users.pm @@ -16,13 +16,6 @@ use base 'Exporter'; our @EXPORT = qw(&checkLogin ¬LoggedComplaint); -sub genLocMenu( $$$ ) { - my( $req, $args, $actions ) = @_; - my $addr = PciIds::Address::new( $req->uri() ); - genCustomMenu( $req, $addr, $args, $actions ); - genPath( $req, $addr, 1 ); -} - sub genRegisterForm( $$$$ ) { my( $req, $args, $error, $values ) = @_; genHtmlHead( $req, 'Register a new user', undef ); @@ -69,7 +62,7 @@ sub registerSubmit( $$$ ) {#A registration form has been submited "\nThank you\n". "\n(This is an autogenerated email, do not respond to it)" ); genHtmlHead( $req, 'Registration email sent', undef ); - print "

Register email sent

\n"; + print "

Registration email sent

\n"; genLocMenu( $req, $args, [ [ 'Log in', 'login' ] ] ); print '

An email containing further information has been sent to you. @@ -223,7 +216,7 @@ sub loginSubmit( $$$ ) { genHtmlHead( $req, 'Logged in', undef ); print '

Logged in

'; genPath( $req, PciIds::Address::new( $req->uri() ), 1 ); - print '

You are logged in.'; + print "

You are logged in" . ( defined $args->{'redirectaction'} ? ", continue with your action.\n" : ".\n" ); print '

'.encode( $last ).'

' if( defined( $last ) ); genHtmlTail(); return OK; diff --git a/PciIds/Html/Util.pm b/PciIds/Html/Util.pm index 85d03de..a21d383 100644 --- a/PciIds/Html/Util.pm +++ b/PciIds/Html/Util.pm @@ -7,7 +7,7 @@ use PciIds::Users; use Apache2::Const qw(:common :http); use APR::Table; -our @EXPORT = qw(&genHtmlHead &htmlDiv &genHtmlTail &genTableHead &genTableTail &parseArgs &buildExcept &buildArgs &genMenu &genCustomMenu &encode &setAddrPrefix &HTTPRedirect &genPath &logItem); +our @EXPORT = qw(&genHtmlHead &htmlDiv &genHtmlTail &genTableHead &genTableTail &parseArgs &buildExcept &buildArgs &genMenu &genCustomMenu &encode &setAddrPrefix &HTTPRedirect &genPath &logItem &genLocMenu); sub encode( $ ) { return encode_entities( shift, "\"'&<>" ); @@ -136,4 +136,11 @@ sub genPath( $$$ ) { print "\n"; } +sub genLocMenu( $$$ ) { + my( $req, $args, $actions ) = @_; + my $addr = PciIds::Address::new( $req->uri() ); + genCustomMenu( $req, $addr, $args, $actions ); + genPath( $req, $addr, 1 ); +} + 1;