[Catalyst-commits] r8422 - in CatalystX-CRUD/CatalystX-CRUD/trunk:
. lib/CatalystX/CRUD/Model
karpet at dev.catalyst.perl.org
karpet at dev.catalyst.perl.org
Tue Sep 16 20:50:10 BST 2008
Author: karpet
Date: 2008-09-16 20:50:10 +0100 (Tue, 16 Sep 2008)
New Revision: 8422
Modified:
CatalystX-CRUD/CatalystX-CRUD/trunk/Changes
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/Utils.pm
Log:
coerce field_names into an array ref
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/Changes
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/Changes 2008-09-15 16:02:35 UTC (rev 8421)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/Changes 2008-09-16 19:50:10 UTC (rev 8422)
@@ -163,4 +163,7 @@
* make_sql_query() -- returned hash ref now has query_hash as plain_query value
and the stringify'd Query object as plain_query_str
+0.31 xxx
+ * add missing req to Makefile.PL
+ * force field_names to be an ARRAY ref in Utils make_sql_query()
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/Utils.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/Utils.pm 2008-09-15 16:02:35 UTC (rev 8421)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/Utils.pm 2008-09-16 19:50:10 UTC (rev 8422)
@@ -153,6 +153,10 @@
$field_names = $c->req->params->{'cxc-query-fields'};
}
+ if ( !ref($field_names) ) {
+ $field_names = [$field_names];
+ }
+
my $p2q = $self->params_to_sql_query($field_names);
my $params = $c->req->params;
my $sp = Sort::SQL->string2array( $self->_which_sort($c) );
More information about the Catalyst-commits
mailing list