[freeside-commits] freeside/FS/FS Upgrade.pm,1.53,1.54

Ivan,,, ivan at wavetail.420.am
Wed Oct 26 15:15:30 PDT 2011


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv5804

Modified Files:
	Upgrade.pm 
Log Message:
fix inadvertantly-encrypted COMP, etc. payinfo, not just BILL

Index: Upgrade.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Upgrade.pm,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -w -d -r1.53 -r1.54
--- Upgrade.pm	23 Aug 2011 21:45:49 -0000	1.53
+++ Upgrade.pm	26 Oct 2011 22:15:28 -0000	1.54
@@ -129,14 +129,16 @@
 
   }
 
-  # decrypt all payinfo where payby = BILL
+  # decrypt inadvertantly-encrypted payinfo where payby != CARD,DCRD,CHEK,DCHK
   # kind of a weird spot for this, but it's better than duplicating
   # all this code in each class...
   my @decrypt_tables = qw( cust_main cust_pay_void cust_pay cust_refund cust_pay_pending );
   foreach my $table ( @decrypt_tables ) {
-      my @objects = qsearch({   'table'     => $table,
-                                'hashref'   => { 'payby' => 'BILL', },
-                                'extra_sql' => 'AND LENGTH(payinfo) > 100',
+      my @objects = qsearch({
+        'table'     => $table,
+        'hashref'   => {},
+        'extra_sql' => "WHERE payby NOT IN ( 'CARD', 'DCRD', 'CHEK', 'DCHK' ) ".
+                       " AND LENGTH(payinfo) > 100",
                               });
       foreach my $object ( @objects ) {
           my $payinfo = $object->decrypt($object->payinfo);



More information about the freeside-commits mailing list