[Rt-commit] [svn] r1108 - rt/branches/rt-3.1/html/Ticket

alexmv at pallas.eruditorum.org alexmv at pallas.eruditorum.org
Thu Jun 17 20:32:09 EDT 2004


Author: alexmv
Date: Thu Jun 17 20:32:09 2004
New Revision: 1108

Modified:
   rt/branches/rt-3.1/html/Ticket/ModifyAll.html
Log:
RT-Ticket: 5746
RT-Status: resolved
RT-Update: correspond

 * Apply patch from 5746 to fix bug where attachments to jumbo were
   ignored


Modified: rt/branches/rt-3.1/html/Ticket/ModifyAll.html
==============================================================================
--- rt/branches/rt-3.1/html/Ticket/ModifyAll.html	(original)
+++ rt/branches/rt-3.1/html/Ticket/ModifyAll.html	Thu Jun 17 20:32:09 2004
@@ -119,13 +119,29 @@
     @dresults = ProcessTicketDates( TicketObj => $Ticket, ARGSRef => \%ARGS);
     @lresults = ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS);
 
-    $ARGS{'UpdateContent'} =~ s/\r\n/\n/g;
+    if ($ARGS{'UpdateAttachment'}) {
+        my $subject = "$ARGS{'UpdateAttachment'}";
+        # since CGI.pm deutf8izes the magic field, we need to add it back.
+        Encode::_utf8_on($subject);
+        # strip leading directories
+        $subject =~ s#^.*[\\/]##;
+
+        my $attachment = MakeMIMEEntity(
+           Subject             => $subject,
+           Body                => "",
+           AttachmentFieldName => 'UpdateAttachment'
+        );
+	delete $ARGS{'UpdateAttachment'};
+	$ARGS{'UpdateAttachments'}->{ $subject } = $attachment;
+    }
 
-    if ($ARGS{'UpdateContent'} && 
-	$ARGS{'UpdateContent'} ne '' && 
+    $ARGS{'UpdateContent'} =~ s/\r+\n/\n/g;
+
+    if ($ARGS{'UpdateAttachments'} || (
+        $ARGS{'UpdateContent'} &&
 	$ARGS{'UpdateContent'} ne  "-- \n" . 
 				$session{'CurrentUser'}->UserObj->Signature
-       ) {
+       )) {
    	 ProcessUpdateMessage(TicketObj => $Ticket, 
 			      ARGSRef=>\%ARGS, 
                               Actions=>\@results);


More information about the Rt-commit mailing list