[interchange-cvs] interchange - heins modified 2 files
interchange-core@interchange.redhat.com
interchange-core@interchange.redhat.com
Thu Jan 31 10:18:01 2002
User: heins
Date: 2002-01-31 15:17:34 GMT
Modified: code/SystemTag include.coretag
Modified: lib/Vend Form.pm
Log:
* Fix behavior when $ishash, i.e., called from [item-accessories ...]
or [item-options], making those work in Vend::Form.
* Fix include.coretag so that the $locale is not defined by default --
this was causing [L] ... [/L] to show up when called with positional
parameters. (Problem was using $_[1].)
Revision Changes Path
1.2 +6 -5 interchange/code/SystemTag/include.coretag
rev 1.2, prev_rev 1.1
Index: include.coretag
===================================================================
RCS file: /anon_cvs/repository/interchange/code/SystemTag/include.coretag,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- include.coretag 29 Jan 2002 05:52:38 -0000 1.1
+++ include.coretag 31 Jan 2002 15:17:34 -0000 1.2
@@ -2,9 +2,10 @@
UserTag include PosNumber 2
UserTag include Routine <<EOR
sub {
- Vend::Interpolate::interpolate_html(
- Vend::Util::readfile
- ($_[0], $Global::NoAbsolute, $_[1])
- );
- }
+ my ($file, $locale) = @_;
+ $locale = 1 unless defined $locale;
+ return Vend::Interpolate::interpolate_html(
+ Vend::Util::readfile($file, $Global::NoAbsolute, $locale)
+ );
+}
EOR
2.2 +2 -0 interchange/lib/Vend/Form.pm
rev 2.2, prev_rev 2.1
Index: Form.pm
===================================================================
RCS file: /anon_cvs/repository/interchange/lib/Vend/Form.pm,v
retrieving revision 2.1
retrieving revision 2.2
diff -u -r2.1 -r2.2
--- Form.pm 31 Jan 2002 14:58:41 -0000 2.1
+++ Form.pm 31 Jan 2002 15:17:34 -0000 2.2
@@ -1,6 +1,6 @@
# Vend::Form - Generate Form widgets
#
-# $Id: Form.pm,v 2.1 2002/01/31 14:58:41 mheins Exp $
+# $Id: Form.pm,v 2.2 2002/01/31 15:17:34 mheins Exp $
#
# Copyright (C) 1996-2001 Red Hat, Inc. <interchange@redhat.com>
#
@@ -36,7 +36,7 @@
require Exporter;
@ISA = qw(Exporter);
-$VERSION = substr(q$Revision: 2.1 $, 10);
+$VERSION = substr(q$Revision: 2.2 $, 10);
@EXPORT = qw (
display
@@ -750,8 +750,10 @@
my $adder;
$adder = $item->{mv_ip} if defined $item->{mv_ip}
and $opt->{item} || ! $opt->{name};
+ $opt->{value} = $item->{$opt->{attribute} || $opt->{name}};
$opt->{name} = $opt->{attribute} unless $opt->{name};
$opt->{name} .= $adder if defined $adder;
+ $opt->{price} = get_option_hash($opt->{price_data}) if $opt->{price};
#::logDebug("tag_accessories: name=$name");
}
else {