[interchange-cvs] interchange - racke modified
lib/Vend/Table/Editor.pm
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Mon Mar 8 16:06:51 EST 2004
User: racke
Date: 2004-03-08 21:06:51 GMT
Modified: lib/Vend/Table Editor.pm
Log:
weed out duplicates in ui_data_fields originating from bad metadata,
causing error in item edit:
probable bad form -- number of values min=0 (wholesale) max=2 (sku)
Revision Changes Path
1.53 +8 -4 interchange/lib/Vend/Table/Editor.pm
rev 1.53, prev_rev 1.52
Index: Editor.pm
===================================================================
RCS file: /anon_cvs/repository/interchange/lib/Vend/Table/Editor.pm,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- Editor.pm 22 Feb 2004 19:28:38 -0000 1.52
+++ Editor.pm 8 Mar 2004 21:06:50 -0000 1.53
@@ -1,6 +1,6 @@
# Vend::Table::Editor - Swiss-army-knife table editor for Interchange
#
-# $Id: Editor.pm,v 1.52 2004/02/22 19:28:38 mheins Exp $
+# $Id: Editor.pm,v 1.53 2004/03/08 21:06:50 racke Exp $
#
# Copyright (C) 2002-2003 Interchange Development Group
# Copyright (C) 2002 Mike Heins <mike at perusion.net>
@@ -26,7 +26,7 @@
package Vend::Table::Editor;
use vars qw($VERSION);
-$VERSION = substr(q$Revision: 1.52 $, 10);
+$VERSION = substr(q$Revision: 1.53 $, 10);
use Vend::Util;
use Vend::Interpolate;
@@ -2022,8 +2022,12 @@
my $linecount;
CANONCOLS: {
- my @cols = split /[,\0\s]/, $opt->{ui_data_fields};
- #@cols = grep /:/ || $db->column_exists($_), @cols;
+ my (@cols, %colseen);
+
+ for (split /[,\0\s]/, $opt->{ui_data_fields}) {
+ next if $colseen{$_}++;
+ push (@cols, $_);
+ }
$opt->{ui_data_fields} = join " ", @cols;
More information about the interchange-cvs
mailing list