X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=PciIds%2FHtml%2FNotifications.pm;h=fc20e1cef2bb0aa484e148088f2b9e6ee6ddbb09;hb=904a25d66ec221203148aa1559b5d062860788ce;hp=9aa18260709de7707925d9a93327d7e927dc048c;hpb=b1525dcddea4116c2bb21c671c380a404b4ad4b3;p=pciids.git diff --git a/PciIds/Html/Notifications.pm b/PciIds/Html/Notifications.pm index 9aa1826..fc20e1c 100644 --- a/PciIds/Html/Notifications.pm +++ b/PciIds/Html/Notifications.pm @@ -23,6 +23,7 @@ use PciIds::Html::Util; use PciIds::Html::Forms; use PciIds::Html::Users; use PciIds::Address; +use PciIds::Config; use Apache2::Const qw(:common :http); sub genNotifForm( $$$$$$ ) { @@ -70,6 +71,7 @@ sub genNotifForm( $$$$$$ ) { sub notifForm( $$$$ ) { my( $req, $args, $tables, $auth ) = @_; + return HTTPRedirect( $req, '/mods/'.$config{'default_uri'}.'?action=notifications' ) if $req->uri() =~ /^(\/(read|mods))?\/?$/; if( defined $auth->{'authid'} ) { return genNotifForm( $req, $args, $tables, $auth, undef, $tables->getNotifData( $auth->{'authid'}, PciIds::Address::new( $req->uri() )->get() ) ); } else { @@ -102,4 +104,6 @@ sub notifFormSubmit( $$$$ ) { return HTTPRedirect( $req, setAddrPrefix( $req->uri(), 'read' ).buildExcept( 'action', $args )."?action=list" ); } +checkConf( [ 'default_uri' ] ); + 1;