[Rt-commit] r18030 - in rt/3.999/branches/merge_to_3.8.2: .
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Thu Jan 29 07:08:37 EST 2009
Author: sunnavy
Date: Thu Jan 29 07:08:34 2009
New Revision: 18030
Modified:
rt/3.999/branches/merge_to_3.8.2/ (props changed)
rt/3.999/branches/merge_to_3.8.2/share/html/Ticket/Update.html
Log:
r19244 at sunnavys-mb: sunnavy | 2009-01-29 20:04:54 +0800
merged share/html/Ticket/Update.html
Modified: rt/3.999/branches/merge_to_3.8.2/share/html/Ticket/Update.html
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/share/html/Ticket/Update.html (original)
+++ rt/3.999/branches/merge_to_3.8.2/share/html/Ticket/Update.html Thu Jan 29 07:08:34 2009
@@ -55,7 +55,7 @@
<form action="Update.html" name="ticket_update"
method="post" enctype="multipart/form-data">
-% $m->callback( Callbackname => 'form_start', args_ref => \%ARGS );
+% $m->callback( Callbackname => 'form_start', args_ref => \%ARGS, ticket => $ticket_obj );
<input type="hidden" class="hidden" name="quote_transaction" value="<% $ARGS{quote_transaction}||'' %>" />
<input type="hidden" class="hidden" name="default_status" value="<% $default_status ||''%>" />
<input type="hidden" class="hidden" name="action" value="<% $ARGS{action}||'' %>" />
@@ -166,14 +166,16 @@
my $ticket_obj = load_ticket($id);
-$m->callback( ticket => $ticket_obj, args_ref => \%ARGS, Callbackname => 'initial' );
+my @results;
+
+$m->callback( ticket => $ticket_obj, args_ref => \%ARGS, results => \@results, callbackname => 'Initial' );
unless($default_status){
$default_status=($ARGS{'status'} ||$ticket_obj->status());
}
if ($default_status =~ '^new$'){
- $default_status='open';
+ $default_status='open';
}
if ($default_status eq 'resolved') {
@@ -206,7 +208,7 @@
# {{{ deal with deleting uploaded attachments
foreach my $key (keys %ARGS) {
if ($key =~ m/^DeleteAttach-(.+)$/) {
- delete $session{'Attachments'}{$1};
+ delete $session{'Attachments'}{$1};
}
$session{'Attachments'} = { %{$session{'Attachments'} || {}} };
}
@@ -214,21 +216,15 @@
# {{{ 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 = make_mime_entity(
- filename => $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,
+ };
}
# }}}
@@ -238,8 +234,6 @@
}
# }}}
-my @results;
-
my $gnupg_widget = $m->comp('/Elements/GnuPG/SignEncryptWidget:new', arguments => \%ARGS );
$m->comp( '/Elements/GnuPG/SignEncryptWidget:Process',
self => $gnupg_widget,
More information about the Rt-commit
mailing list