[Jifty-commit] r1879 - jifty/trunk/lib/Jifty/Action/Record
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Wed Aug 30 12:55:01 EDT 2006
Author: nelhage
Date: Wed Aug 30 12:55:01 2006
New Revision: 1879
Modified:
jifty/trunk/lib/Jifty/Action/Record/Search.pm
Log:
Don't create _gt and _lt search fields for magic _id refers_to fields.
Modified: jifty/trunk/lib/Jifty/Action/Record/Search.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Action/Record/Search.pm (original)
+++ jifty/trunk/lib/Jifty/Action/Record/Search.pm Wed Aug 30 12:55:01 2006
@@ -82,6 +82,9 @@
# XXX TODO: What about booleans? Checkbox doesn't quite work,
# since there are three choices: yes, no, either.
+ # Magic _id refers_to columns
+ next if($field =~ /^(.*)_id$/ && $self->record->column($1));
+
if($column->type =~ /^(?:text|varchar)/i) {
my $label = $info->{label} || $field;
$args->{"${field}_contains"} = {%$info, label => "$label contains"};
More information about the Jifty-commit
mailing list