[freeside-commits] freeside/FS/FS Upgrade.pm,1.52.2.1,1.52.2.2
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-serv5807
Modified Files:
Tag: FREESIDE_2_3_BRANCH
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.52.2.1
retrieving revision 1.52.2.2
diff -u -w -d -r1.52.2.1 -r1.52.2.2
--- Upgrade.pm 23 Aug 2011 21:46:33 -0000 1.52.2.1
+++ Upgrade.pm 26 Oct 2011 22:15:28 -0000 1.52.2.2
@@ -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