[Jifty-commit] r3350 - in jifty/trunk/lib/Jifty: .
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Mon Jun 4 16:27:39 EDT 2007
Author: clkao
Date: Mon Jun 4 16:27:38 2007
New Revision: 3350
Modified:
jifty/trunk/lib/Jifty/Web.pm
jifty/trunk/lib/Jifty/Web/PageRegion.pm
Log:
Make redirect inside region work.
Modified: jifty/trunk/lib/Jifty/Web.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web.pm (original)
+++ jifty/trunk/lib/Jifty/Web.pm Mon Jun 4 16:27:38 2007
@@ -639,7 +639,7 @@
my $redirect_to_url = '' ;
-
+
if ( (grep { not $_->action_class->isa('Jifty::Action::Redirect') }
values %{ { $self->response->results } })
or $self->request->state_variables
@@ -1299,7 +1299,7 @@
my $self = shift;
my $path = shift;
return undef unless (my $region = $self->current_region);
- $region->path($path);
+ $region->force_path($path);
$region->render;
}
Modified: jifty/trunk/lib/Jifty/Web/PageRegion.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/PageRegion.pm (original)
+++ jifty/trunk/lib/Jifty/Web/PageRegion.pm Mon Jun 4 16:27:38 2007
@@ -310,6 +310,13 @@
$subrequest->path( $self->path );
$subrequest->top_request( Jifty->web->request->top_request );
+ if ($self->path =~ m/\?/) {
+ # XXX: this only happens if we are redirect within region AND
+ # with continuation, which is already taken care of by the
+ # clone.
+ my ($path, $arg) = split(/\?/, $self->path, 2);
+ $subrequest->path( $path );
+ }
# Remove all of the actions
unless ($enable_actions) {
$_->active(0) for ($subrequest->actions);
More information about the Jifty-commit
mailing list