Allow BML pages to be redirected internally to other system pages
(e.g., for the new pages that show up when you try to view a protected entry)
Patch by allen.
diffs (22 lines):
diff -r bd1001b1fd47 -r 934819846600 lib/Apache/BML.pm
--- a/lib/Apache/BML.pm Mon Jan 11 04:00:18 2010 +0000
+++ b/lib/Apache/BML.pm Wed Jul 07 12:38:32 2010 +0800
@@ -326,6 +326,18 @@ sub handler
BML::send_cookies($req);
$r->pool->cleanup_register(\&reset_codeblock) if $req->{'clean_package'};
+
+ # internal redirect, if set previously
+ if ( $r->notes->{internal_redir} ) {
+ my $int_redir = DW::Routing->call( uri => $r->notes->{internal_redir}
);
+ if ( defined $int_redir ) {
+ # we got a match; remove the internal_redir setting, clear the
+ # request cache, and return DECLINED.
+ $r->notes->{internal_redir} = undef;
+ LJ::start_request();
+ return DECLINED;
+ }
+ }
# redirect, if set previously
if ($req->{'location'}) {
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog