encryption-on-insert bugfix from untd
[freeside.git] / FS / FS / Record.pm
index 94efc36..114b1d6 100644 (file)
@@ -712,7 +712,7 @@ sub insert {
   
   # Encrypt before the database
   my $conf = new FS::Conf;
-  if ($conf->exists('encryption') && defined(eval '@FS::'. $table . 'encrypted_fields')) {
+  if ($conf->exists('encryption') && defined(eval '@FS::'. $table . '::encrypted_fields')) {
     foreach my $field (eval '@FS::'. $table . '::encrypted_fields') {
       $self->{'saved'} = $self->getfield($field);
       $self->setfield($field, $self->enrypt($self->getfield($field)));