don't look up encryption config every record, RT#28526
authorIvan Kohler <ivan@freeside.biz>
Sun, 17 May 2015 23:21:03 +0000 (16:21 -0700)
committerIvan Kohler <ivan@freeside.biz>
Sun, 17 May 2015 23:21:03 +0000 (16:21 -0700)
FS/FS/Record.pm

index e324f15..b2ab713 100644 (file)
@@ -65,9 +65,9 @@ FS::UID->install_callback( sub {
   die $@ if $@;
   $conf = FS::Conf->new; 
   $conf_encryption           = $conf->exists('encryption');
-  $conf_encryptionmodule     = $conf->exists('encryptionmodule');
-  $conf_encryptionpublickey  = $conf->exists('encryptionpublickey');
-  $conf_encryptionprivatekey = $conf->exists('encryptionprivatekey');
+  $conf_encryptionmodule     = $conf->config('encryptionmodule');
+  $conf_encryptionpublickey  = $conf->config('encryptionpublickey');
+  $conf_encryptionprivatekey = $conf->config('encryptionprivatekey');
   $money_char = $conf->config('money_char') || '$';
   my $nw_coords = $conf->exists('geocode-require_nw_coordinates');
   $lat_lower = $nw_coords ? 1 : -90;