]> mj.ucw.cz Git - pciids.git/blobdiff - PciIds/Html/Handler.pm
Help index
[pciids.git] / PciIds / Html / Handler.pm
index 4392baf2a74d5c2c672075ecd7f820e3d67ff8a0..879086a26c4632175eb5127fc8eab119edbff926 100644 (file)
@@ -39,7 +39,8 @@ my %handlers = (
                #Some debug
                'test' => \&PciIds::Html::Debug::test,
                #Notifications
-               'notifications' => \&PciIds::Html::Notifications::notifForm
+               'notifications' => \&PciIds::Html::Notifications::notifForm,
+               'help' => \&PciIds::Html::Help::getHelp
        },
        'POST' => {
                'newitem' => \&PciIds::Html::Changes::newItemSubmit,
@@ -57,10 +58,9 @@ my %handlers = (
 
 sub handler( $$ ) {
        my( $req, $hasSSL ) = @_;
-       return HTTPRedirect( $req, $req->uri()."index.html" ) if( $req->uri() eq '/' );
-       return DECLINED if( $req->uri() =~ /^\/((static)\/|robots.txt|index.html)/ );
-       return getHelp( $req ) if( $req->uri() =~ /^\/help/ );
        my $args = parseArgs( $req->args() );
+       return HTTPRedirect( $req, $req->uri()."index.html" ) if( $req->uri() eq '/' && ( !defined $args->{'action'} || $args->{'action'} ne 'help' ) );
+       return DECLINED if( $req->uri() =~ /^\/((static)\/|robots.txt|index.html)/ );
        my $action = $args->{'action'};
        $action = '' unless( defined $action );
        my $method = $handlers{$req->method()};