projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
minor refactor and better safeguards on term discounts, #15068
[freeside.git]
/
FS
/
FS
/
Record.pm
diff --git
a/FS/FS/Record.pm
b/FS/FS/Record.pm
index
2fec8e0
..
514df49
100644
(file)
--- a/
FS/FS/Record.pm
+++ b/
FS/FS/Record.pm
@@
-1014,7
+1014,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)));
}
}
@@
-1309,7
+1309,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 '';
}
@@
-2006,7
+2008,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;
}
@@
-2244,7
+2246,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);
@@
-2254,7
+2256,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
@@
-2636,7
+2638,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);
}