From: Simon Cozens Date: Sat, 31 Jan 2004 19:06:03 +0000 (+0000) Subject: Slighty naughty bug there. X-Git-Tag: 2.10~323 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=648cdcaffc857aa90acee36c6c2412c2dbfb3c9f;p=maypole.git Slighty naughty bug there. git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@39 48953598-375a-da11-a14b-00016c27c3ee --- diff --git a/lib/Apache/MVC/Model/CDBI.pm b/lib/Apache/MVC/Model/CDBI.pm index 8d75c30..d842d5f 100644 --- a/lib/Apache/MVC/Model/CDBI.pm +++ b/lib/Apache/MVC/Model/CDBI.pm @@ -59,8 +59,7 @@ sub search :Exported { my $oper = "like"; # For now use Carp; Carp::confess("Urgh") unless ref $r; my %params = %{$r->{params}}; - my %values = map { $_ => {$oper, $oper eq "like" ? "%".$params{$_}."%" - :$params{$_} } } + my %values = map { $_ => {$oper, $params{$_} } } grep { $params{$_} and $fields{$_} } keys %params; $r->objects([ %values ? $self->search_where(%values) : $self->retrieve_all ]);