[Rt-commit] r3744 - in rt/branches/QUEBEC-EXPERIMENTAL: .
html/SelfService
jesse at bestpractical.com
jesse at bestpractical.com
Thu Sep 1 14:11:44 EDT 2005
Author: jesse
Date: Thu Sep 1 14:11:43 2005
New Revision: 3744
Modified:
rt/branches/QUEBEC-EXPERIMENTAL/ (props changed)
rt/branches/QUEBEC-EXPERIMENTAL/html/SelfService/Display.html
Log:
r14197 at hualien: jesse | 2005-09-01 13:42:09 -0400
r7158 at hualien: jesse | 2005-07-30 11:08:03 -0400
r4909 at hualien (orig r3501): alexmv | 2005-07-18 15:00:38 -0400
r5198 at zoq-fot-pik: chmrr | 2005-07-18 14:59:07 -0400
* Fix TransactionBatch / DESTROY bug (backport from QUEBEC)
r7124 at hualien (orig r3546): kevinr | 2005-07-28 14:51:34 -0400
r6713 at SAD-GIRL-IN-SNOW: kevinr | 2005-07-28 14:50:47 -0400
RT-Ticket: 6892
RT-Status: resolved
RT-Update: correspond
* Applied patch from Hsin-Chan Chien to fix a bug with attachment uploading
in SelfService mode.
Modified: rt/branches/QUEBEC-EXPERIMENTAL/html/SelfService/Display.html
==============================================================================
--- rt/branches/QUEBEC-EXPERIMENTAL/html/SelfService/Display.html (original)
+++ rt/branches/QUEBEC-EXPERIMENTAL/html/SelfService/Display.html Thu Sep 1 14:11:43 2005
@@ -93,6 +93,30 @@
my @id = ( ref $id eq 'ARRAY' ) ? @{$id} : ($id);
my $Ticket = new RT::Ticket( $session{'CurrentUser'} );
+
+# store the uploaded attachment in session
+if ( $ARGS{'Attach'} ) { # attachment?
+ $session{'Attachments'} = {} unless defined $session{'Attachments'};
+
+ my $subject = "$ARGS{'Attach'}";
+
+ # 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 => 'Attach'
+ );
+
+ $session{'Attachments'} =
+ { %{ $session{'Attachments'} || {} },
+ $ARGS{'Attach'} => $attachment };
+}
+
if ( $id[0] eq 'new' ) {
# {{{ Create a new ticket
@@ -110,28 +134,6 @@
$m->abort;
}
- # {{{ store the uploaded attachment in session
- if ( $ARGS{'Attach'} ) { # attachment?
- $session{'Attachments'} = {} unless defined $session{'Attachments'};
-
- my $subject = "$ARGS{'Attach'}";
-
- # 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 => 'Attach'
- );
-
- $session{'Attachments'} =
- { %{ $session{'Attachments'} || {} },
- $ARGS{'Attach'} => $attachment };
- }
( $Ticket, @results ) =
CreateTicket( Attachments => $session{'Attachments'}, %ARGS, Status => 'new' );
More information about the Rt-commit
mailing list