]> mj.ucw.cz Git - pciids.git/commitdiff
Redirection from login works again
authorMichal Vaner <vorner@ucw.cz>
Sat, 30 Aug 2008 09:33:34 +0000 (11:33 +0200)
committerMichal Vaner <vorner@ucw.cz>
Sat, 30 Aug 2008 09:33:34 +0000 (11:33 +0200)
PciIds/Html/Users.pm
PciIds/Html/Util.pm

index 317702fcc2aedc38c710690f93f5ec72d7cffc61..8cab64e11661b25faa301137852cdfe8aeccb760 100644 (file)
@@ -16,13 +16,6 @@ use base 'Exporter';
 
 our @EXPORT = qw(&checkLogin &notLoggedComplaint);
 
-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 "<h1>Register email sent</h1>\n";
+       print "<h1>Registration email sent</h1>\n";
        genLocMenu( $req, $args, [ [ 'Log in', 'login' ] ] );
        print '<p>
                        An email containing further information has been sent to you.
@@ -223,7 +216,7 @@ sub loginSubmit( $$$ ) {
                genHtmlHead( $req, 'Logged in', undef );
                print '<h1>Logged in</h1>';
                genPath( $req, PciIds::Address::new( $req->uri() ), 1 );
-               print '<p>You are logged in.';
+               print "<p>You are logged in" . ( defined $args->{'redirectaction'} ? ", continue with your <a href='$url'>action</a>.\n" : ".\n" );
                print '<div class="lastlog"><p>'.encode( $last ).'</div>' if( defined( $last ) );
                genHtmlTail();
                return OK;
index 85d03de320f9bf6bd11b4917834cd08dd0a1815e..a21d38363a451d77afc5d4d1b4a8a27842a28343 100644 (file)
@@ -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 "</div>\n";
 }
 
+sub genLocMenu( $$$ ) {
+       my( $req, $args, $actions ) = @_;
+       my $addr = PciIds::Address::new( $req->uri() );
+       genCustomMenu( $req, $addr, $args, $actions );
+       genPath( $req, $addr, 1 );
+}
+
 1;