[interchange-cvs] interchange - heins modified lib/Vend/Interpolate.pm
interchange-core@interchange.redhat.com
interchange-core@interchange.redhat.com
Mon Jan 21 21:35:01 2002
User: heins
Date: 2002-01-22 02:34:40 GMT
Modified: lib/Vend Interpolate.pm
Log:
* Prevent converting exchange rates twice for shipping -- bug found
and patch supplied by Frederic Steinfels <fredo@dvdupgrades.ch>.
Revision Changes Path
2.41 +7 -3 interchange/lib/Vend/Interpolate.pm
rev 2.41, prev_rev 2.40
Index: Interpolate.pm
===================================================================
RCS file: /anon_cvs/repository/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.40
retrieving revision 2.41
diff -u -r2.40 -r2.41
--- Interpolate.pm 2002/01/17 15:19:09 2.40
+++ Interpolate.pm 2002/01/22 02:34:40 2.41
@@ -1,6 +1,6 @@
# Vend::Interpolate - Interpret Interchange tags
#
-# $Id: Interpolate.pm,v 2.40 2002/01/17 15:19:09 jon Exp $
+# $Id: Interpolate.pm,v 2.41 2002/01/22 02:34:40 mheins Exp $
#
# Copyright (C) 1996-2001 Red Hat, Inc. <interchange@redhat.com>
#
@@ -27,7 +27,7 @@
require Exporter;
@ISA = qw(Exporter);
-$VERSION = substr(q$Revision: 2.40 $, 10);
+$VERSION = substr(q$Revision: 2.41 $, 10);
@EXPORT = qw (
@@ -583,6 +583,8 @@
sub vars_and_comments {
my $html = shift;
+ ## We never want to interpolate vars if in restricted mode
+ return if $Vend::restricted;
local($^W) = 0;
# Remove Minivend 3 legacy [new] tags
@@ -7501,7 +7503,9 @@
}
}
$out = Vend::Util::round_to_frac_digits($out);
- $out = currency($out, $opt->{noformat}, $opt->{convert});
+ ## Conversion would have been done above, force to 0, as
+ ## found by Frederic Steinfels
+ $out = currency($out, $opt->{noformat}, 0);
}
return $out unless $opt->{hide};
return;