X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=inline;f=FS%2FFS%2FRecord.pm;h=4937347296c60effc9369fd08e76c670d39791f4;hb=8cc50a2ad12ec3d5bd3f31db741290664064ef06;hp=8ab96cf6a93f8d29710797b0fe38919f43fa7556;hpb=9c2f7147ea99459d69c7264a7a7c7a80f6f3d5a0;p=freeside.git diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index 8ab96cf6a..493734729 100644 --- a/FS/FS/Record.pm +++ b/FS/FS/Record.pm @@ -12,7 +12,7 @@ use File::Slurp qw( slurp ); use File::CounterFile; use Text::CSV_XS; use DBI qw(:sql_types); -use DBIx::DBSchema 0.42; #for foreign keys +use DBIx::DBSchema 0.43; #0.43 for foreign keys use Locale::Country; use Locale::Currency; use NetAddr::IP; # for validation @@ -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)) {