diff options
author | ivan <ivan> | 2004-11-11 12:13:50 +0000 |
---|---|---|
committer | ivan <ivan> | 2004-11-11 12:13:50 +0000 |
commit | c582e92888b4a5553e1b4e5214cf35217e4a0cf0 (patch) | |
tree | 3fe7cd7bf22bd356b478f0de0dd8f0b140fcee23 /rt/html/Ticket/ModifyAll.html | |
parent | 289340780927b5bac2c7604d7317c3063c6dd8cc (diff) |
import rt 3.0.12
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); |