[Jifty-commit] r1054 - in jifty/trunk: lib/Jifty

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Sun May 14 09:27:10 EDT 2006


Author: seanmil
Date: Sun May 14 09:27:07 2006
New Revision: 1054

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Web.pm

Log:
 r64 at localhost:  sean | 2006-05-14 09:24:10 -0400
 * Fix for inconsistent state_variable handling, move to using
   the request to store all state_variables


Modified: jifty/trunk/lib/Jifty/Web.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web.pm	(original)
+++ jifty/trunk/lib/Jifty/Web.pm	Sun May 14 09:27:07 2006
@@ -671,8 +671,8 @@
     if ( defined wantarray ) {
         return $clickable->generate->render;
     } else {
-        $clickable->state_variable( $_ => $self->{'state_variables'}{$_} )
-            for keys %{ $self->{'state_variables'} };
+        $clickable->state_variable( $_->key, $_->value )
+            for $self->request->state_variables;
 
         my $request = Jifty::Request->new(path => Jifty->web->request->path)
           ->from_webform(%{Jifty->web->request->arguments}, $clickable->get_parameters);
@@ -872,8 +872,7 @@
     my $name  = shift;
     my $value = shift;
 
-    $self->{'state_variables'}->{$name} = $value;
-
+    $self->request->add_state_variable( key => $name, value => $value );
 }
 
 =head3 state_variables
@@ -888,8 +887,8 @@
 sub state_variables {
     my $self = shift;
     my %vars;
-    $vars{ "J:V-" . $_ } = $self->{'state_variables'}->{$_}
-        for keys %{ $self->{'state_variables'} };
+    $vars{ "J:V-" . $_->key } = $_->value
+        for $self->request->state_variables;
 
     return %vars;
 }


More information about the Jifty-commit mailing list