diff options
Diffstat (limited to 'rt/html/Ticket/ModifyAll.html')
-rw-r--r-- | rt/html/Ticket/ModifyAll.html | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/rt/html/Ticket/ModifyAll.html b/rt/html/Ticket/ModifyAll.html index 1163f3fa5..1d0500d16 100644 --- a/rt/html/Ticket/ModifyAll.html +++ b/rt/html/Ticket/ModifyAll.html @@ -76,7 +76,7 @@ </tr> <tr> <td class="label"><&|/l&>Subject</&>:</td> - <td class="entry"><input name="UpdateSubject" size=60 value=""></td> + <td class="entry"><input name="UpdateSubject" size=60 value="<%$Ticket->Subject%>"></td> </tr> <tr> <td class="label"><&|/l&>Attach</&>:</td> @@ -119,13 +119,29 @@ unless ($OnlySearchForPeople) { @dresults = ProcessTicketDates( TicketObj => $Ticket, ARGSRef => \%ARGS); @lresults = ProcessTicketLinks( TicketObj => $Ticket, ARGSRef => \%ARGS); - $ARGS{'UpdateContent'} =~ s/\r\n/\n/g; - - if ($ARGS{'UpdateContent'} && - $ARGS{'UpdateContent'} ne '' && + 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; + } + + $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); |