[freeside-commits] freeside/FS/FS Upgrade.pm,1.51,1.52
Erik Levinson
levinse at wavetail.420.am
Wed Jul 20 20:42:57 PDT 2011
- Previous message: [freeside-commits] freeside/rt/lib/RT Tickets_Overlay.pm, 1.14, 1.15
- Next message: [freeside-commits] freeside/bin 21commit, 1.1, 1.2 231add, NONE, 1.1 231commit, NONE, 1.1 23add, NONE, 1.1 23commit, NONE, 1.1 23diff, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv27470/FS/FS
Modified Files:
Upgrade.pm
Log Message:
fix BILL payinfo encrypted unnecessarily, RT13190
Index: Upgrade.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Upgrade.pm,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -w -d -r1.51 -r1.52
--- Upgrade.pm 1 Jul 2011 06:54:02 -0000 1.51
+++ Upgrade.pm 21 Jul 2011 03:42:55 -0000 1.52
@@ -129,6 +129,24 @@
}
+ # decrypt all payinfo where payby = BILL
+ # 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',
+ });
+ foreach my $object ( @objects ) {
+ my $payinfo = $object->decrypt($object->payinfo);
+ die "error decrypting payinfo" if $payinfo eq $object->payinfo;
+ $object->payinfo($payinfo);
+ my $error = $object->replace;
+ die $error if $error;
+ }
+ }
+
}
=item upgrade_data
- Previous message: [freeside-commits] freeside/rt/lib/RT Tickets_Overlay.pm, 1.14, 1.15
- Next message: [freeside-commits] freeside/bin 21commit, 1.1, 1.2 231add, NONE, 1.1 231commit, NONE, 1.1 23add, NONE, 1.1 23commit, NONE, 1.1 23diff, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list