[Rt-commit] r18007 - in rt/3.999/branches/merge_to_3.8.2: .

sunnavy at bestpractical.com sunnavy at bestpractical.com
Thu Jan 29 04:13:37 EST 2009


Author: sunnavy
Date: Thu Jan 29 04:13:37 2009
New Revision: 18007

Modified:
   rt/3.999/branches/merge_to_3.8.2/   (props changed)
   rt/3.999/branches/merge_to_3.8.2/share/html/SelfService/Display.html

Log:
 r19197 at sunnavys-mb:  sunnavy | 2009-01-29 17:07:14 +0800
 merged share/html/SelfService/Display.html


Modified: rt/3.999/branches/merge_to_3.8.2/share/html/SelfService/Display.html
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/share/html/SelfService/Display.html	(original)
+++ rt/3.999/branches/merge_to_3.8.2/share/html/SelfService/Display.html	Thu Jan 29 04:13:37 2009
@@ -102,22 +102,15 @@
 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 = make_mime_entity(
-        subject             => $subject,
-        AttachmentFieldname => 'attach',
+        attachment_field_name => 'attach',
     );
 
-    $session{'Attachments'} =
-    { %{ $session{'Attachments'} || {} },
-        $ARGS{'attach'} => $attachment };
+    my $file_path = Encode::decode_utf8("$ARGS{'Attach'}");
+    $session{'Attachments'} = {
+        %{ $session{'Attachments'} || {} },
+        $file_path => $attachment,
+    };
 }
 
 if ( defined ($id[0]) && $id[0] eq 'new' ) {


More information about the Rt-commit mailing list