projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
clarify docs on bandwidth.com account and site numbers, #39914
[freeside.git]
/
FS
/
FS
/
Record.pm
diff --git
a/FS/FS/Record.pm
b/FS/FS/Record.pm
index
72745fe
..
18624e6
100644
(file)
--- a/
FS/FS/Record.pm
+++ b/
FS/FS/Record.pm
@@
-204,6
+204,7
@@
sub new {
$self->{'modified'} = 0;
$self->{'modified'} = 0;
+ $self->_simplecache($self->{'Hash'}) if $self->can('_simplecache');
$self->_cache($self->{'Hash'}, shift) if $self->can('_cache') && @_;
$self;
$self->_cache($self->{'Hash'}, shift) if $self->can('_cache') && @_;
$self;
@@
-519,6
+520,7
@@
sub qsearch {
# Check for encrypted fields and decrypt them.
## only in the local copy, not the cached object
# Check for encrypted fields and decrypt them.
## only in the local copy, not the cached object
+ no warnings 'deprecated'; # XXX silence the warning for now
if ( $conf_encryption
&& eval 'defined(@FS::'. $table . '::encrypted_fields)' ) {
foreach my $record (@return) {
if ( $conf_encryption
&& eval 'defined(@FS::'. $table . '::encrypted_fields)' ) {
foreach my $record (@return) {
@@
-1162,8
+1164,7
@@
sub insert {
my $table = $self->table;
# Encrypt before the database
my $table = $self->table;
# Encrypt before the database
- if ( defined(eval '@FS::'. $table . '::encrypted_fields')
- && scalar( eval '@FS::'. $table . '::encrypted_fields')
+ if ( scalar( eval '@FS::'. $table . '::encrypted_fields')
&& $conf_encryption
) {
foreach my $field (eval '@FS::'. $table . '::encrypted_fields') {
&& $conf_encryption
) {
foreach my $field (eval '@FS::'. $table . '::encrypted_fields') {
@@
-1405,9
+1406,8
@@
sub replace {
# Encrypt for replace
my $saved = {};
# Encrypt for replace
my $saved = {};
- if ( $conf_encryption
- && defined(eval '@FS::'. $new->table . '::encrypted_fields')
- && scalar( eval '@FS::'. $new->table . '::encrypted_fields')
+ if ( scalar( eval '@FS::'. $new->table . '::encrypted_fields')
+ && $conf_encryption
) {
foreach my $field (eval '@FS::'. $new->table . '::encrypted_fields') {
next if $field eq 'payinfo'
) {
foreach my $field (eval '@FS::'. $new->table . '::encrypted_fields') {
next if $field eq 'payinfo'