[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[5916] trunk/LedgerSMB.pm
- Subject: SF.net SVN: ledger-smb:[5916] trunk/LedgerSMB.pm
- From: ..hidden..
- Date: Tue, 23 Jul 2013 07:30:33 +0000
Revision: 5916
http://sourceforge.net/p/ledger-smb/code/5916
Author: einhverfr
Date: 2013-07-23 07:30:29 +0000 (Tue, 23 Jul 2013)
Log Message:
-----------
Correcting single payment/receipt interface (trunk only) to ensure that arrays of db-aware types are properly handled
Modified Paths:
--------------
trunk/LedgerSMB.pm
Modified: trunk/LedgerSMB.pm
===================================================================
--- trunk/LedgerSMB.pm 2013-07-22 19:59:26 UTC (rev 5915)
+++ trunk/LedgerSMB.pm 2013-07-23 07:30:29 UTC (rev 5916)
@@ -693,6 +693,13 @@
$sth->bind_param($place, $carg->{value},
{ pg_type => $carg->{type} });
} else {
+ if (ref($carg) eq 'ARRAY'){
+ if (eval{$carg->[0]->can('to_db')}){
+ for my $ref(@$carg){
+ $ref = $ref->to_db;
+ }
+ }
+ }
$sth->bind_param($place, $carg);
}
++$place;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.