X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FSelfService%2FDisplay.html;h=857ebfa983f4ff5e5c5561dd08c6c6bf3ececd80;hb=679854b8bbc65d112071111bbd7f34a6a481fb30;hp=23c74672a299ef2c67096185a469f6f5371bda6f;hpb=9b328d940af56b9924a342192ebb0790478fa705;p=freeside.git diff --git a/rt/share/html/SelfService/Display.html b/rt/share/html/SelfService/Display.html index 23c74672a..857ebfa98 100755 --- a/rt/share/html/SelfService/Display.html +++ b/rt/share/html/SelfService/Display.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 %# %# %# (Except where explicitly superseded by other copyright notices) @@ -100,21 +100,6 @@ my @id = ( ref $id eq 'ARRAY' ) ? @{$id} : ($id); my $Ticket = RT::Ticket->new( $session{'CurrentUser'} ); -# store the uploaded attachment in session -if ( defined $ARGS{'Attach'} && length $ARGS{'Attach'} ) { # attachment? - $session{'Attachments'} = {} unless defined $session{'Attachments'}; - - my $attachment = MakeMIMEEntity( - AttachmentFieldName => 'Attach' - ); - - my $file_path = Encode::decode_utf8("$ARGS{'Attach'}"); - $session{'Attachments'} = { - %{ $session{'Attachments'} || {} }, - $file_path => $attachment, - }; -} - if ( defined ($id[0]) && $id[0] eq 'new' ) { # {{{ Create a new ticket @@ -134,19 +119,12 @@ if ( defined ($id[0]) && $id[0] eq 'new' ) { ( $Ticket, @results ) = - CreateTicket( Attachments => $session{'Attachments'}, %ARGS ); + CreateTicket( Attachments => delete $session{'Attachments'}, %ARGS ); unless ( $Ticket->id ) { $m->comp( 'Error.html', Why => join( "\n", @results )); $m->abort(); } - - - # delete temporary storage entry to make WebUI clean - unless ( keys %{ $session{'Attachments'} } and $ARGS{'UpdateAttach'} ) { - delete $session{'Attachments'}; - } - } else { unless ( $Ticket->Load( $id[0] ) ) { @@ -172,12 +150,7 @@ if ( defined ($id[0]) && $id[0] eq 'new' ) { ARGSRef => \%ARGS, TicketObj => $Ticket ); - delete $session{'Attachments'}; - - # delete temporary storage entry to make WebUI clean - unless ( keys %{ $session{'Attachments'} } and $ARGS{'UpdateAttach'} ) { - delete $session{'Attachments'}; - } + delete $session{'Attachments'}; my @cfupdates = ProcessObjectCustomFieldUpdates(Object => $Ticket, ARGSRef => \%ARGS); push (@results, @cfupdates);