[Rt-commit] r2729 - in rt/branches/PLATANO-EXPERIMENTAL-CSS: .
html/SelfService
jesse at bestpractical.com
jesse at bestpractical.com
Sat Apr 16 04:20:09 EDT 2005
Author: jesse
Date: Sat Apr 16 04:20:09 2005
New Revision: 2729
Modified:
rt/branches/PLATANO-EXPERIMENTAL-CSS/ (props changed)
rt/branches/PLATANO-EXPERIMENTAL-CSS/html/SelfService/Display.html
Log:
r13118 at hualien: jesse | 2005-04-16 03:12:53 -0400
r13017 at hualien: jesse | 2005-04-16 02:27:49 -0400
r12959 at hualien: jesse | 2005-04-15 17:42:51 -0400
r12790 at hualien: jesse | 2005-04-14 15:07:03 -0400
* Fix support for uploading attachmends in selfservice. -- HC Chien
Modified: rt/branches/PLATANO-EXPERIMENTAL-CSS/html/SelfService/Display.html
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL-CSS/html/SelfService/Display.html (original)
+++ rt/branches/PLATANO-EXPERIMENTAL-CSS/html/SelfService/Display.html Sat Apr 16 04:20:09 2005
@@ -103,6 +103,29 @@
$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' );
@@ -147,29 +170,6 @@
push @results, "$msg";
}
- # {{{ 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 (
More information about the Rt-commit
mailing list