summaryrefslogtreecommitdiff
path: root/rt/share/html/SelfService/Display.html
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2012-06-07 00:56:06 -0700
committerIvan Kohler <ivan@freeside.biz>2012-06-07 00:56:06 -0700
commit43a06151e47d2c59b833cbd8c26d97865ee850b6 (patch)
tree42c51d94e7fa265461b508d061562be204ccc2c1 /rt/share/html/SelfService/Display.html
parent6587f6ba7d047ddc1686c080090afe7d53365bd4 (diff)
starting to work...
Diffstat (limited to 'rt/share/html/SelfService/Display.html')
-rwxr-xr-xrt/share/html/SelfService/Display.html18
1 files changed, 6 insertions, 12 deletions
diff --git a/rt/share/html/SelfService/Display.html b/rt/share/html/SelfService/Display.html
index 4f227b1..23c7467 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
%# <sales@bestpractical.com>
%#
%# (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";
}
- # }}}
}