X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FRecord.pm;h=51cb6dc8ebd7356bc9a1af2c7f53ba10d64b1599;hb=3146245f510ef873c4176bc06dc891f990db8f1e;hp=8f75734439944e39415f03f2c8006a3081731f82;hpb=b95c330fd8e0acde52b6743274fa003f821a84ef;p=freeside.git diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index 8f7573443..51cb6dc8e 100644 --- a/FS/FS/Record.pm +++ b/FS/FS/Record.pm @@ -408,7 +408,6 @@ sub qsearch { push @statement, $statement; warn "[debug]$me $statement\n" if $DEBUG > 1 || $debug; - foreach my $field ( grep defined( $record->{$_} ) && $record->{$_} ne '', @real_fields @@ -2650,8 +2649,8 @@ sub ut_alpha_lower { Check/untaint phone numbers. May be null. If there is an error, returns the error, otherwise returns false. -Takes an optional two-letter ISO country code; without it or with unsupported -countries, ut_phonen simply calls ut_alphan. +Takes an optional two-letter ISO 3166-1 alpha-2 country code; without +it or with unsupported countries, ut_phonen simply calls ut_alphan. =cut @@ -3323,7 +3322,7 @@ sub scalar_sql { defined($scalar) ? $scalar : ''; } -=item count [ WHERE ] +=item count [ WHERE [, PLACEHOLDER ...] ] Convenience method for the common case of "SELECT COUNT(*) FROM table", with optional WHERE. Must be called as method on a class with an @@ -3336,7 +3335,7 @@ sub count { my $table = $self->table or die 'count called on object of class '.ref($self); my $sql = "SELECT COUNT(*) FROM $table"; $sql .= " WHERE $where" if $where; - $self->scalar_sql($sql); + $self->scalar_sql($sql, @_); } =back