X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FSelfService%2FDisplay.html;h=23c74672a299ef2c67096185a469f6f5371bda6f;hp=4f227b18a60e2b4df5b7551e7c61e445d21ecdd2;hb=43a06151e47d2c59b833cbd8c26d97865ee850b6;hpb=6587f6ba7d047ddc1686c080090afe7d53365bd4 diff --git a/rt/share/html/SelfService/Display.html b/rt/share/html/SelfService/Display.html index 4f227b18a..23c74672a 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-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -74,7 +74,6 @@ -%#!!pape: selfservice_find_attachments.patch {{ <& /Ticket/Elements/ShowHistory, Ticket => $Ticket, URIFile => "Display.html", @@ -84,7 +83,6 @@ Attachments => $attachments, UpdatePath => "Update.html" &> -%#!!pape: selfservice_find_attachments.patch }} @@ -94,16 +92,16 @@ my ( $field, @results ); $m->callback( ARGSRef => \%ARGS, CallbackName => 'Initial' ); -# {{{ Load the ticket +# Load the ticket #If we get handed two ids, mason will make them an array. bleck. # We want teh first one. Just because there's no other sensible way # to deal my @id = ( ref $id eq 'ARRAY' ) ? @{$id} : ($id); -my $Ticket = new RT::Ticket( $session{'CurrentUser'} ); +my $Ticket = RT::Ticket->new( $session{'CurrentUser'} ); # store the uploaded attachment in session -if ( $ARGS{'Attach'} ) { # attachment? +if ( defined $ARGS{'Attach'} && length $ARGS{'Attach'} ) { # attachment? $session{'Attachments'} = {} unless defined $session{'Attachments'}; my $attachment = MakeMIMEEntity( @@ -121,7 +119,7 @@ if ( defined ($id[0]) && $id[0] eq 'new' ) { # {{{ Create a new ticket - my $Queue = new RT::Queue( $session{'CurrentUser'} ); + my $Queue = RT::Queue->new( $session{'CurrentUser'} ); unless ( $Queue->Load( $ARGS{'Queue'} ) ) { $m->comp( 'Error.html', Why => loc('Queue not found') ); $m->abort; @@ -136,21 +134,19 @@ if ( defined ($id[0]) && $id[0] eq 'new' ) { ( $Ticket, @results ) = - CreateTicket( Attachments => $session{'Attachments'}, %ARGS, Status => 'new' ); + CreateTicket( Attachments => $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] ) ) { @@ -186,7 +182,6 @@ if ( defined ($id[0]) && $id[0] eq 'new' ) { my @cfupdates = ProcessObjectCustomFieldUpdates(Object => $Ticket, ARGSRef => \%ARGS); push (@results, @cfupdates); - # }}} #Update the status if ( ( defined $ARGS{'Status'} ) @@ -196,7 +191,6 @@ if ( defined ($id[0]) && $id[0] eq 'new' ) { ( $code, $msg ) = $Ticket->SetStatus( $ARGS{'Status'} ); push @results, "$msg"; } - # }}} }