[interchange-cvs] interchange - heins modified 2 files

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Thu May 12 13:54:37 EDT 2005


User:      heins
Date:      2005-05-12 17:54:37 GMT
Modified:  lib/Vend Config.pm Data.pm
Log:
* Prevent a Global database from instantiating $C and screwing up configuration.

* Allow setting of no-import status within the table config instead of
  the action-at-a-distance of NoImport. Allows global database tables
  to control their own destiny.

Revision  Changes    Path
2.174     +4 -4      interchange/lib/Vend/Config.pm


rev 2.174, prev_rev 2.173
Index: Config.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Config.pm,v
retrieving revision 2.173
retrieving revision 2.174
diff -u -r2.173 -r2.174
--- Config.pm	9 May 2005 03:19:12 -0000	2.173
+++ Config.pm	12 May 2005 17:54:37 -0000	2.174
@@ -1,6 +1,6 @@
 # Vend::Config - Configure Interchange
 #
-# $Id: Config.pm,v 2.173 2005/05/09 03:19:12 mheins Exp $
+# $Id: Config.pm,v 2.174 2005/05/12 17:54:37 mheins Exp $
 #
 # Copyright (C) 2002-2003 Interchange Development Group
 # Copyright (C) 1996-2002 Red Hat, Inc.
@@ -51,7 +51,7 @@
 use Vend::File;
 use Vend::Data;
 
-$VERSION = substr(q$Revision: 2.173 $, 10);
+$VERSION = substr(q$Revision: 2.174 $, 10);
 
 my %CDname;
 my %CPname;
@@ -81,6 +81,7 @@
 my %DirectiveAlias = qw(
 	DataDir        ProductDir
 	DefaultTables  ProductFiles 
+	Profiles       OrderProfile 
 );
 
 for( qw(search refresh cancel return secure unsecure submit control checkout) ) {
@@ -3809,7 +3810,6 @@
 		return $c;
 	}
 
-#::logDebug("parse_database: $value");
 	$c = $C ? $C->{Database} : $Global::Database;
 
 	my($database,$remain) = split /[\s,]+/, $value, 2;
@@ -3883,7 +3883,7 @@
 		elsif ($d->{'type'} eq '9') { $d->{Class} = 'LDAP'						}
 		else 						{ $d->{Class} ||= $Global::Default_database	}
 
-		if($C->{DatabaseDefault}) {
+		if($C and $C->{DatabaseDefault}) {
 			while ( my($k, $v) = each %{$C->{DatabaseDefault}}) {
 				$d->{$k} = $v;
 			}



2.49      +2 -2      interchange/lib/Vend/Data.pm


rev 2.49, prev_rev 2.48
Index: Data.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Data.pm,v
retrieving revision 2.48
retrieving revision 2.49
diff -u -r2.48 -r2.49
--- Data.pm	30 Apr 2005 15:09:58 -0000	2.48
+++ Data.pm	12 May 2005 17:54:37 -0000	2.49
@@ -1,6 +1,6 @@
 # Vend::Data - Interchange databases
 #
-# $Id: Data.pm,v 2.48 2005/04/30 15:09:58 mheins Exp $
+# $Id: Data.pm,v 2.49 2005/05/12 17:54:37 mheins Exp $
 # 
 # Copyright (C) 2002-2004 Interchange Development Group
 # Copyright (C) 1996-2002 Red Hat, Inc.
@@ -829,7 +829,7 @@
 	my $class_config;
 	my $db;
 
-	my $no_import = defined $Vend::Cfg->{NoImport}->{$name};
+	my $no_import = defined $Vend::Cfg->{NoImport}->{$name} || $obj->{NO_IMPORT};
 
 	if (defined $Vend::ForceImport{$name}) {
 		undef $no_import;








More information about the interchange-cvs mailing list