X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FRecord.pm;h=35ed6f7a894c2013381ef4141d50040da1be0299;hb=4f0250a76508176cdf5336c199c883a3912f5274;hp=f8282c0314f52a405916efbf48a31f641bd474ad;hpb=8e2372530191ae32938786363885aa4b540e29c7;p=freeside.git diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index f8282c031..35ed6f7a8 100644 --- a/FS/FS/Record.pm +++ b/FS/FS/Record.pm @@ -489,6 +489,8 @@ sub qsearch { $sth->finish; + #below was refactored out to _from_hashref, this should use it at some point + my @return; if ( eval 'scalar(@FS::'. $table. '::ISA);' ) { if ( eval 'FS::'. $table. '->can(\'new\')' eq \&new ) { @@ -876,6 +878,7 @@ sub qsearchs { # $result_record = &FS::Record:qsearchs('table',\%hash); my $table = $_[0]; my(@result) = qsearch(@_); cluck "warning: Multiple records in scalar search ($table)" + #.join(' / ', map "$_=>".$_[1]->{$_}, keys %{ $_[1] } ) if scalar(@result) > 1; #should warn more vehemently if the search was on a primary key? scalar(@result) ? ($result[0]) : ();