[interchange-cvs] interchange - heins modified lib/Vend/Interpolate.pm
interchange-core@interchange.redhat.com
interchange-core@interchange.redhat.com
Thu Jan 31 15:27:01 2002
User: heins
Date: 2002-01-31 20:26:18 GMT
Modified: lib/Vend Interpolate.pm
Log:
* Make the final permutations of [item-accessories ...] work for
backward compatibility.
* Need to test with "simple" to really be sure....
Revision Changes Path
2.48 +10 -2 interchange/lib/Vend/Interpolate.pm
rev 2.48, prev_rev 2.47
Index: Interpolate.pm
===================================================================
RCS file: /anon_cvs/repository/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.47
retrieving revision 2.48
diff -u -r2.47 -r2.48
--- Interpolate.pm 31 Jan 2002 17:32:31 -0000 2.47
+++ Interpolate.pm 31 Jan 2002 20:26:18 -0000 2.48
@@ -1,6 +1,6 @@
# Vend::Interpolate - Interpret Interchange tags
#
-# $Id: Interpolate.pm,v 2.47 2002/01/31 17:32:31 mheins Exp $
+# $Id: Interpolate.pm,v 2.48 2002/01/31 20:26:18 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.47 $, 10);
+$VERSION = substr(q$Revision: 2.48 $, 10);
@EXPORT = qw (
@@ -2202,6 +2202,14 @@
$extra =~ s/\s+$//;
@{$opt}{qw/attribute type column table name outboard passed/} =
split /\s*,\s*/, $extra;
+ if($code) {
+ $opt->{type} ||= 'select';
+ if(! $opt->{table}) {
+ my $col = $opt->{column} || $opt->{attribute};
+ $opt->{passed} ||= product_field($col, $code)
+ if $col;
+ }
+ }
}
($attribute, $type, $field, $db, $name, $outboard, $passed) =
@{$opt}{qw/attribute type column table name outboard passed/};