From 05607cb1da71edc2332874b5ddace9cc430ee3f3 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Sat, 5 Jul 2008 22:54:46 +0000 Subject: Correcting more GMP errors in other formats git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2188 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/Template/CSV.pm | 2 +- LedgerSMB/Template/ODS.pm | 2 +- LedgerSMB/Template/TXT.pm | 2 +- LedgerSMB/Template/XLS.pm | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'LedgerSMB/Template') diff --git a/LedgerSMB/Template/CSV.pm b/LedgerSMB/Template/CSV.pm index 50edef15..2ba90e0f 100755 --- a/LedgerSMB/Template/CSV.pm +++ b/LedgerSMB/Template/CSV.pm @@ -63,7 +63,7 @@ sub preprocess { push @{$vars}, preprocess( $_ ); } } elsif ( !$type or $type eq 'SCALAR' ) { # Scalar - if ($type eq 'SCALAR' ) { + if ($type eq 'SCALAR' or $type eq 'Math::BigInt::GMP') { $vars = $$rawvars; } else { $vars = $rawvars; diff --git a/LedgerSMB/Template/ODS.pm b/LedgerSMB/Template/ODS.pm index f3a37583..858f55cd 100644 --- a/LedgerSMB/Template/ODS.pm +++ b/LedgerSMB/Template/ODS.pm @@ -807,7 +807,7 @@ sub preprocess { } } elsif (!$type) { return escapeHTML($rawvars); - } elsif ($type eq 'SCALAR') { + } elsif ($type eq 'SCALAR' or $type eq 'Math::BigInt::GMP') { return escapeHTML($$rawvars); } else { # Hashes and objects for ( keys %{$rawvars} ) { diff --git a/LedgerSMB/Template/TXT.pm b/LedgerSMB/Template/TXT.pm index 66169613..ec4aaec3 100755 --- a/LedgerSMB/Template/TXT.pm +++ b/LedgerSMB/Template/TXT.pm @@ -67,7 +67,7 @@ sub process { } else { $output = \$parent->{output}; } - if (ref $parent->{template} eq 'SCALAR') { + if (ref $parent->{template} eq 'SCALAR' or $type eq 'Math::BigInt::GMP') { $source = $parent->{template}; } elsif (ref $parent->{template} eq 'ARRAY') { $source = join "\n", @{$parent->{template}}; diff --git a/LedgerSMB/Template/XLS.pm b/LedgerSMB/Template/XLS.pm index acb8196e..a5c0627a 100644 --- a/LedgerSMB/Template/XLS.pm +++ b/LedgerSMB/Template/XLS.pm @@ -75,7 +75,7 @@ sub preprocess { } } elsif (!$type) { return escapeHTML($rawvars); - } elsif ($type eq 'SCALAR') { + } elsif ($type eq 'SCALAR' or $type eq 'Math::BigInt::GMP') { return escapeHTML($$rawvars); } else { # Hashes and objects for ( keys %{$rawvars} ) { -- cgit v1.2.3