[Bps-public-commit] r20182 - RT-BugTracker-Public/html/Public
ruz at bestpractical.com
ruz at bestpractical.com
Wed Dec 2 04:11:32 EST 2009
Author: ruz
Date: Wed Dec 2 04:11:32 2009
New Revision: 20182
Modified:
RT-BugTracker-Public/html/Public/autohandler
Log:
* cover more another group of paths fro redirect
Modified: RT-BugTracker-Public/html/Public/autohandler
==============================================================================
--- RT-BugTracker-Public/html/Public/autohandler (original)
+++ RT-BugTracker-Public/html/Public/autohandler Wed Dec 2 04:11:32 2009
@@ -1,14 +1,16 @@
<%INIT>
return $m->call_next if RT::BugTracker::Public->IsPublicUser;
-$RT::Logger->debug("Not a public user, not BitCard, not Openid. Going to redirect to main URL");
-# This is not a public user
+$RT::Logger->debug(
+ "Not a public user, not BitCard, not Openid."
+ ." Going to redirect to main URL"
+);
-my $public_path = $m->request_comp->path;
-my $new_path = $public_path;
+my $new_path = $m->request_path;
$new_path =~ s{/+Public/}{/};
# special cases:
+$new_path =~ s{^/+(?:Browse|Dist/+BeginsWith)\.html}{/Dist/Browse.html};
$new_path =~ s{^/Bug/+Display\.html}{/Ticket/Display.html};
$new_path =~ s{^/Bug/+Report\.html}{/Ticket/Create.html};
$new_path =~ s{^/Bug/+}{/Ticket/};
@@ -19,6 +21,9 @@
# delete user && password from arguments
delete @ARGS{'pass', 'user'};
-$m->redirect( $RT::WebPath . $new_path . '?'. $m->comp('/Elements/QueryString', %ARGS) );
+$m->redirect(
+ $RT::WebPath . $new_path
+ .'?'. $m->comp('/Elements/QueryString', %ARGS)
+);
$m->abort;
</%INIT>
More information about the Bps-public-commit
mailing list