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

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Fri Jun 4 02:17:19 EDT 2004


User:      heins
Date:      2004-06-04 06:17:18 GMT
Modified:  lib/Vend Data.pm
Log:
* Skip uploading blob files as well as standard {image,upload}helper
  files/filenames.

Revision  Changes    Path
2.41      +10 -2     interchange/lib/Vend/Data.pm


rev 2.41, prev_rev 2.40
Index: Data.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Data.pm,v
retrieving revision 2.40
retrieving revision 2.41
diff -u -r2.40 -r2.41
--- Data.pm	4 Jun 2004 04:05:35 -0000	2.40
+++ Data.pm	4 Jun 2004 06:17:16 -0000	2.41
@@ -1,6 +1,6 @@
 # Vend::Data - Interchange databases
 #
-# $Id: Data.pm,v 2.40 2004/06/04 04:05:35 mheins Exp $
+# $Id: Data.pm,v 2.41 2004/06/04 06:17:16 mheins Exp $
 # 
 # Copyright (C) 2002-2003 Interchange Development Group
 # Copyright (C) 1996-2002 Red Hat, Inc.
@@ -1849,6 +1849,8 @@
 	my $prikey		= $CGI::values{mv_data_key};
 	my $decode		= is_yes($CGI::values{mv_data_decode});
 
+	my %skip_for_now;
+
 	my $en_col;
 #::logDebug("data_enable=$::Scratch->{mv_data_enable}, checking");
 	if($::Scratch->{mv_data_enable} =~ /^(\w+):(.*?):/s) {
@@ -1993,7 +1995,12 @@
 			my $nm = $file_fields[$i];
 			unless (length($data{$nm}->[0])) {
 				# no need for a file update
-				$data{$nm}->[0] = $file_oldfiles[$i];
+				if($file_oldfiles[$i]) {
+					$data{$nm}->[0] = $file_oldfiles[$i];
+				}
+				else {
+					$skip_for_now{$nm} = 1;
+				}
 				next;
 			}
 
@@ -2143,6 +2150,7 @@
 		for(keys %data) {
 #::logDebug("iteration of field $_");
 
+			next if $skip_for_now{$_};
 			next unless (length($value = $data{$_}->[$i]) || $CGI::values{mv_update_empty} );
 			push(@k, $_);
 # LEGACY








More information about the interchange-cvs mailing list