diff options
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/Record.pm | 4 | ||||
-rw-r--r-- | FS/bin/freeside-queued | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm index a36256bc7..053c441f6 100644 --- a/FS/FS/Record.pm +++ b/FS/FS/Record.pm @@ -1256,7 +1256,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 { @@ -2974,7 +2974,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)) { diff --git a/FS/bin/freeside-queued b/FS/bin/freeside-queued index dcc6ac4ba..2a88c5605 100644 --- a/FS/bin/freeside-queued +++ b/FS/bin/freeside-queued @@ -12,6 +12,7 @@ use FS::Record qw(qsearch); use FS::queue; use FS::queue_depend; use FS::Log; +use FS::Cron::expire_user_pref qw( expire_user_pref ); # no autoloading for non-FS classes... use Net::SSH 0.07; @@ -66,6 +67,7 @@ while (1) { if ( $kids >= $max_kids ) { warn "WARNING: maximum $kids children reached\n" unless $warnkids++; &reap_kids; + expire_user_pref() unless $warnkids % 10; sleep 1; #waiting for signals is cheap next; } @@ -131,6 +133,7 @@ while (1) { undef $FS::UID::dbh; next; }; + expire_user_pref(); sleep $sleep_time; next; } |