[Jifty-commit] r1946 - in jifty/trunk: lib/Jifty/Action/Record

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Sun Sep 10 14:59:21 EDT 2006


Author: jesse
Date: Sun Sep 10 14:59:20 2006
New Revision: 1946

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Action/Record/Create.pm

Log:
 r27330 at pinglin:  jesse | 2006-09-10 17:55:45 +0100
 * Added a concept of "virtual" actions to arguemnt. These won't be passed on to Record classes, even if they're sumbitted. We use this for Password confirmation arguments, so that we don't pass password_confirm on to the database, which is kinda useless (and breaks the db ;)


Modified: jifty/trunk/lib/Jifty/Action/Record/Create.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Action/Record/Create.pm	(original)
+++ jifty/trunk/lib/Jifty/Action/Record/Create.pm	Sun Sep 10 14:59:20 2006
@@ -57,7 +57,8 @@
     my $record = $self->record;
 
     my %values;
-    for (grep { defined $self->argument_value($_) } $self->argument_names) {
+    # Virtual arguments aren't really ever backed by data structures. they're added by jifty for things like confirmations
+    for (grep { defined $self->argument_value($_) && !$self->arguments->{$_}->{virtual} } $self->argument_names) {
         $values{$_} = $self->argument_value($_);
         if (ref $values{$_} eq "Fh") { # CGI.pm's "lightweight filehandle class"
             local $/;


More information about the Jifty-commit mailing list