[interchange-cvs] interchange - edl modified 2 files

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Wed Feb 4 18:45:40 EST 2004


User:      edl
Date:      2004-02-04 23:45:39 GMT
Modified:  lib/Vend Interpolate.pm
Modified:  dist/foundation/etc report
Log:
Handle mime types for attachments better - fixed in Interpolate.pm,
demo'd in etc/report

Revision  Changes    Path
2.203     +5 -3      interchange/lib/Vend/Interpolate.pm


rev 2.203, prev_rev 2.202
Index: Interpolate.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.202
retrieving revision 2.203
diff -u -r2.202 -r2.203
--- Interpolate.pm	3 Feb 2004 13:32:41 -0000	2.202
+++ Interpolate.pm	4 Feb 2004 23:45:39 -0000	2.203
@@ -1,6 +1,6 @@
 # Vend::Interpolate - Interpret Interchange tags
 # 
-# $Id: Interpolate.pm,v 2.202 2004/02/03 13:32:41 racke Exp $
+# $Id: Interpolate.pm,v 2.203 2004/02/04 23:45:39 edl Exp $
 #
 # Copyright (C) 2002-2003 Interchange Development Group
 # Copyright (C) 1996-2002 Red Hat, Inc.
@@ -28,7 +28,7 @@
 require Exporter;
 @ISA = qw(Exporter);
 
-$VERSION = substr(q$Revision: 2.202 $, 10);
+$VERSION = substr(q$Revision: 2.203 $, 10);
 
 @EXPORT = qw (
 
@@ -2126,7 +2126,7 @@
 							':=' . $$
 		unless defined $::Instance->{MIME_BOUNDARY};
 
-	my $msg_type = $opt->{attach_only} ? "multipart/mixed" : "multipart/alternative";
+	my $msg_type = "multipart/mixed";
 	if($option eq 'reset') {
 		undef $::Instance->{MIME_TIMESTAMP};
 		undef $::Instance->{MIME_BOUNDARY};
@@ -2155,10 +2155,12 @@
 		$::Instance->{MIME} = 1;
 		my $desc = $opt->{description} || $option;
 		my $type = $opt->{type} || 'TEXT/PLAIN; CHARSET=US-ASCII';
+		my $disposition = $opt->{attach_only} ? qq{attachment; filename="$desc"} : "inline";
 		$out = <<EndOFmiMe;
 --$::Instance->{MIME_BOUNDARY}
 Content-Type: $type
 Content-ID: $id
+Content-Disposition: $disposition
 Content-Description: $desc
 
 $text



2.1       +2 -1      interchange/dist/foundation/etc/report


rev 2.1, prev_rev 2.0
Index: report
===================================================================
RCS file: /var/cvs/interchange/dist/foundation/etc/report,v
retrieving revision 2.0
retrieving revision 2.1
diff -u -r2.0 -r2.1
--- report	18 Jul 2001 02:20:59 -0000	2.0
+++ report	4 Feb 2004 23:45:39 -0000	2.1
@@ -119,7 +119,8 @@
 [tag	op=mime
 		interpolate=1
 		type=application/pgp-encrypted
-		description="CreditCard_[value mv_order_number]"]
+		attach_only=1
+		description="CreditCard_[value mv_order_number].asc"]
 [value mv_credit_card_info]
 [/tag]
 [/if]








More information about the interchange-cvs mailing list