X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FRecord.pm;h=4937347296c60effc9369fd08e76c670d39791f4;hb=6ced51db0e73603461591e54b7f606467e7c7af0;hp=1a88c3acddd27bc0d9a60017dbc611a434b34743;hpb=b1d823bed5c9d953a62f2b6245b71cbbab191bda;p=freeside.git diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index 1a88c3acd..493734729 100644 --- a/FS/FS/Record.pm +++ b/FS/FS/Record.pm @@ -42,6 +42,7 @@ our $me = '[FS::Record]'; our $nowarn_identical = 0; our $nowarn_classload = 0; our $no_update_diff = 0; +our $no_history = 0; our $no_check_foreign = 1; #well, not inefficiently in perl by default anymore @@ -1250,7 +1251,7 @@ sub insert { } my $h_sth; - if ( defined dbdef->table('h_'. $table) ) { + if ( defined( dbdef->table('h_'. $table) ) && ! $no_history ) { my $h_statement = $self->_h_statement('insert'); warn "[debug]$me $h_statement\n" if $DEBUG > 2; $h_sth = dbh->prepare($h_statement) or do { @@ -3003,7 +3004,7 @@ You should generally not have to worry about calling this, as the system handles sub encrypt { my ($self, $value) = @_; - my $encrypted; + my $encrypted = $value; if ($conf->exists('encryption')) { if ($self->is_encrypted($value)) {