[interchange-cvs] interchange - heins modified lib/Vend/Table/Editor.pm

interchange-core@icdevgroup.org interchange-core@icdevgroup.org
Fri Oct 4 09:41:03 2002


User:      heins
Date:      2002-10-04 13:40:18 GMT
Modified:  lib/Vend/Table Editor.pm
Log:
* Fix problem where empty but defined check would cause profile error for
  "undefined profile check ''".

* Don't bail out for no fields until ui_wizard_fields is parsed.

Revision  Changes    Path
1.12      +9 -8      interchange/lib/Vend/Table/Editor.pm


rev 1.12, prev_rev 1.11
Index: Editor.pm
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/lib/Vend/Table/Editor.pm,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- Editor.pm	3 Oct 2002 17:26:29 -0000	1.11
+++ Editor.pm	4 Oct 2002 13:40:17 -0000	1.12
@@ -1,6 +1,6 @@
 # Vend::Table::Editor - Swiss-army-knife table editor for Interchange
 #
-# $Id: Editor.pm,v 1.11 2002/10/03 17:26:29 mheins Exp $
+# $Id: Editor.pm,v 1.12 2002/10/04 13:40:17 mheins Exp $
 #
 # Copyright (C) 2002 ICDEVGROUP <interchange@icdevgroup.org>
 # Copyright (C) 2002 Mike Heins <mike@perusion.net>
@@ -26,7 +26,7 @@
 package Vend::Table::Editor;
=20
 use vars qw($VERSION);
-$VERSION =3D substr(q$Revision: 1.11 $, 10);
+$VERSION =3D substr(q$Revision: 1.12 $, 10);
=20
 use Vend::Util;
 use Vend::Interpolate;
@@ -1481,6 +1481,7 @@
 		$prof .=3D "\n" unless $prof =3D~ /\n\s*\z/;
 		if(ref $check) {
 			while ( my($k, $v) =3D each %$check ) {
+				next unless length $v;
 				$error->{$k} =3D 1;
 				$v =3D~ s/\s+$//;
 				$v =3D~ s/^\s+//;
@@ -1568,6 +1569,12 @@
 			or return $die->("table-editor: bad table '%s'", $table);
 	}
=20
+	$opt->{ui_data_fields} =3D~ s/[,\0\s]+/ /g;
+
+	if($opt->{ui_wizard_fields}) {
+		$opt->{ui_data_fields} =3D $opt->{ui_display_only} =3D $opt->{ui_wizard_=
fields};
+	}
+
 	if(! $opt->{ui_data_fields}) {
 		if( $opt->{notable}) {
 			::logError("table_editor: no place to get fields!");
@@ -1576,12 +1583,6 @@
 		else {
 			$opt->{ui_data_fields} =3D join " ", $db->columns();
 		}
-	}
-
-	$opt->{ui_data_fields} =3D~ s/[,\0\s]+/ /g;
-
-	if($opt->{ui_wizard_fields}) {
-		$opt->{ui_data_fields} =3D $opt->{ui_display_only} =3D $opt->{ui_wizard_=
fields};
 	}
=20
 	my $keycol;