summaryrefslogtreecommitdiff
path: root/rt/share/html/Ticket/Update.html
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-06-04 00:16:28 -0700
committerIvan Kohler <ivan@freeside.biz>2013-06-04 00:16:28 -0700
commit7588a4ac90a9b07c08a3107cd1107d773be1c991 (patch)
tree55b8bedb5f899e705da0ba7f608267943bf89e94 /rt/share/html/Ticket/Update.html
parent98d2b25256055abb0dfcb9f586b434474fa97afd (diff)
RT 4.0.13
Diffstat (limited to 'rt/share/html/Ticket/Update.html')
-rwxr-xr-xrt/share/html/Ticket/Update.html36
1 files changed, 4 insertions, 32 deletions
diff --git a/rt/share/html/Ticket/Update.html b/rt/share/html/Ticket/Update.html
index 64bd531cf..26a37e80a 100755
--- a/rt/share/html/Ticket/Update.html
+++ b/rt/share/html/Ticket/Update.html
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -278,31 +278,7 @@ $CanComment = 1 if ( $TicketObj->CurrentUserHasRight('CommentOnTicket') or
$TicketObj->CurrentUserHasRight('ModifyTicket') );
-# deal with deleting uploaded attachments
-foreach my $key (keys %ARGS) {
- if ($key =~ m/^DeleteAttach-(.+)$/) {
- delete $session{'Attachments'}{$1};
- }
- $session{'Attachments'} = { %{$session{'Attachments'} || {}} };
-}
-
-# store the uploaded attachment in session
-if ( defined $ARGS{'Attach'} && length $ARGS{'Attach'} ) { # attachment?
- my $attachment = MakeMIMEEntity(
- AttachmentFieldName => 'Attach'
- );
-
- my $file_path = Encode::decode_utf8("$ARGS{'Attach'}");
- $session{'Attachments'} = {
- %{$session{'Attachments'} || {}},
- $file_path => $attachment,
- };
-}
-
-# delete temporary storage entry to make WebUI clean
-unless (keys %{$session{'Attachments'}} and $ARGS{'UpdateAttach'}) {
- delete $session{'Attachments'};
-}
+ProcessAttachments(ARGSRef => \%ARGS);
my $gnupg_widget = $m->comp('/Elements/GnuPG/SignEncryptWidget:new', Arguments => \%ARGS );
$m->comp( '/Elements/GnuPG/SignEncryptWidget:Process',
@@ -312,12 +288,8 @@ $m->comp( '/Elements/GnuPG/SignEncryptWidget:Process',
if ( $ARGS{'SubmitTicket'} ) {
- my %checked = map {$_ => 1} grep {defined}
- (ref $ARGS{'TxnSendMailTo'} eq "ARRAY" ? @{$ARGS{'TxnSendMailTo'}}
- : defined $ARGS{'TxnSendMailTo'} ? ($ARGS{'TxnSendMailTo'}) : ());
-
- my @squelchlist = grep {not $checked{$_}} split /,/, ($ARGS{'TxnRecipients'}||'');
- $ARGS{'SquelchMailTo'} = \@squelchlist if @squelchlist;
+ my %squelched = ProcessTransactionSquelching( \%ARGS );
+ $ARGS{'SquelchMailTo'} = [keys %squelched] if keys %squelched;
my $CFs = $TicketObj->TransactionCustomFields;
my $ValidCFs = $m->comp(