- my $cookie = new CGI::Cookie( -name => 'auth', -value => genAuthToken( $tables, $id, $req, undef, $email ) );
- $req->headers_out->add( 'Set-Cookie' => $cookie );
- $args->{'action'} = ( defined $args->{'redirectaction'} ) ? $args->{'redirectaction'} : 'list';
- delete $args->{'redirectaction'};
- $args->{'full_links'} = 1;
- my $auth = checkLoginInternal( $req, $tables, $cookie );
- return PciIds::Html::Handler::callHandler( $req, $args, $tables, $auth, 1, 'GET' );
+ $req->err_headers_out->add( 'Set-Cookie' => new CGI::Cookie( -name => 'auth', -value => genAuthToken( $tables, $id, $req, undef, $email ) ) );
+ $args->{'action'} = ( defined $args->{'redirectaction'} && $args->{'redirectaction'} ne '' ) ? $args->{'redirectaction'} : 'list';
+ my $url = 'http://'.$req->hostname().setAddrPrefix( $req->uri(), $args->{'action'} eq 'list' ? 'read' : 'mods' ).buildExcept( 'redirectaction', $args );
+ return HTTPRedirect( $req, $url );