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

Jifty commits jifty-commit at lists.jifty.org
Wed May 7 03:42:31 EDT 2008


Author: sartak
Date: Wed May  7 03:42:30 2008
New Revision: 5369

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

Log:
 r55173 at onn:  sartak | 2008-05-07 03:40:28 -0400
 Log an error on invalid display_from or value_from


Modified: jifty/trunk/lib/Jifty/Action.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Action.pm	(original)
+++ jifty/trunk/lib/Jifty/Action.pm	Wed May  7 03:42:30 2008
@@ -1098,6 +1098,13 @@
                 my $disp = $v->{'display_from'};
                 my $val  = $v->{'value_from'};
 
+                unless ($v->{'collection'}->first->can($disp)) {
+                    Jifty->log->error("Invalid 'display_from' of $disp on $field");
+                }
+                unless ($v->{'collection'}->first->can($val)) {
+                    Jifty->log->error("Invalid 'value_from' of $val on $field");
+                }
+
                 # XXX TODO: wrap this in an eval?
 
                 # Fetch all the record from the given collection and keep'em


More information about the Jifty-commit mailing list