projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
better error message for identical replacements
[freeside.git]
/
FS
/
FS
/
Record.pm
diff --git
a/FS/FS/Record.pm
b/FS/FS/Record.pm
index
9596a30
..
caddc6f
100644
(file)
--- a/
FS/FS/Record.pm
+++ b/
FS/FS/Record.pm
@@
-929,7
+929,7
@@
sub insert {
|| $self->isa('FS::payinfo_Mixin') )
&& $self->payby
&& !grep { $self->payby eq $_ } @encrypt_payby;
|| $self->isa('FS::payinfo_Mixin') )
&& $self->payby
&& !grep { $self->payby eq $_ } @encrypt_payby;
- $s
elf->{'saved'
} = $self->getfield($field);
+ $s
aved->{$field
} = $self->getfield($field);
$self->setfield($field, $self->encrypt($self->getfield($field)));
}
}
$self->setfield($field, $self->encrypt($self->getfield($field)));
}
}
@@
-1182,7
+1182,9
@@
sub replace {
? ($_, $new->getfield($_)) : () } $old->fields;
unless (keys(%diff) || $no_update_diff ) {
? ($_, $new->getfield($_)) : () } $old->fields;
unless (keys(%diff) || $no_update_diff ) {
- carp "[warning]$me $new -> replace $old: records identical"
+ carp "[warning]$me ". ref($new)."->replace ".
+ ( $primary_key ? "$primary_key ".$new->get($primary_key) : '' ).
+ ": records identical"
unless $nowarn_identical;
return '';
}
unless $nowarn_identical;
return '';
}
@@
-1838,7
+1840,7
@@
sub _h_statement {
;
# If we're encrypting then don't store the payinfo in the history
;
# If we're encrypting then don't store the payinfo in the history
- if ( $conf && $conf->exists('encryption') ) {
+ if ( $conf && $conf->exists('encryption')
&& $self->table ne 'banned_pay'
) {
@fields = grep { $_ ne 'payinfo' } @fields;
}
@fields = grep { $_ ne 'payinfo' } @fields;
}
@@
-2076,7
+2078,7
@@
sub ut_text {
#warn "notexist ". \¬exist. "\n";
#warn "AUTOLOAD ". \&AUTOLOAD. "\n";
$self->getfield($field)
#warn "notexist ". \¬exist. "\n";
#warn "AUTOLOAD ". \&AUTOLOAD. "\n";
$self->getfield($field)
- =~ /^([\w \!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\=\[\]\<\>$money_char]+)$/
+ =~ /^([\w
รด
\!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\=\[\]\<\>$money_char]+)$/
or return gettext('illegal_or_empty_text'). " $field: ".
$self->getfield($field);
$self->setfield($field,$1);
or return gettext('illegal_or_empty_text'). " $field: ".
$self->getfield($field);
$self->setfield($field,$1);
@@
-2086,7
+2088,7
@@
sub ut_text {
=item ut_textn COLUMN
Check/untaint text. Alphanumerics, spaces, and the following punctuation
=item ut_textn COLUMN
Check/untaint text. Alphanumerics, spaces, and the following punctuation
-symbols are currently permitted: ! @ # $ % & ( ) - + ; : ' " , . ? /
+symbols are currently permitted: ! @ # $ % & ( ) - + ; : ' " , . ? /
= [ ] < >
May be null. If there is an error, returns the error, otherwise returns false.
=cut
May be null. If there is an error, returns the error, otherwise returns false.
=cut
@@
-2468,7
+2470,7
@@
sub ut_zip {
{
$self->setfield($field,'');
} else {
{
$self->setfield($field,'');
} else {
- $self->getfield($field) =~ /^\s*(\w[\w\-\s]{
2
,8}\w)\s*$/
+ $self->getfield($field) =~ /^\s*(\w[\w\-\s]{
0
,8}\w)\s*$/
or return gettext('illegal_zip'). " $field: ". $self->getfield($field);
$self->setfield($field,$1);
}
or return gettext('illegal_zip'). " $field: ". $self->getfield($field);
$self->setfield($field,$1);
}