[Jifty-commit] r1877 - in jifty/trunk/lib/Jifty: .
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Wed Aug 30 11:43:49 EDT 2006
Author: nelhage
Date: Wed Aug 30 11:43:48 2006
New Revision: 1877
Modified:
jifty/trunk/lib/Jifty/Action.pm
jifty/trunk/lib/Jifty/Web/PageRegion.pm
Log:
- When rendering a page region, mark actions as inactive, don't remove
them, so that their arguments are available inside fragments.
- If we receive an action's arguments, but it's not in J:ACTIONS, or
we don't run it for some other reason, don't consider it to have
failed for the purposes of stickiness.
Modified: jifty/trunk/lib/Jifty/Action.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Action.pm (original)
+++ jifty/trunk/lib/Jifty/Action.pm Wed Aug 30 11:43:48 2006
@@ -354,7 +354,7 @@
my $field_info = $self->arguments->{$args{'argument'}};
my $sticky = 0;
- $sticky = 1 if $self->sticky_on_failure and (!Jifty->web->response->result($self->moniker) or $self->result->failure);
+ $sticky = 1 if $self->sticky_on_failure and (Jifty->web->response->result($self->moniker) and $self->result->failure);
$sticky = 1 if $self->sticky_on_success and (Jifty->web->response->result($self->moniker) and $self->result->success);
# $sticky can be overrided per-parameter
Modified: jifty/trunk/lib/Jifty/Web/PageRegion.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/PageRegion.pm (original)
+++ jifty/trunk/lib/Jifty/Web/PageRegion.pm Wed Aug 30 11:43:48 2006
@@ -268,7 +268,8 @@
$subrequest->top_request( Jifty->web->request->top_request );
# Remove all of the actions
- $subrequest->clear_actions;
+ $_->active(0) for ($subrequest->actions);
+ # $subrequest->clear_actions;
local Jifty->web->{request} = $subrequest;
# While we're inside this region, have Mason to tack its response
More information about the Jifty-commit
mailing list