[Rt-commit] r19648 - in rt/3.8/branches/3.8.3-releng: . lib/RT lib/RT/Interface share/html/Ticket/Attachment/WithHeaders
falcone at bestpractical.com
falcone at bestpractical.com
Tue May 12 18:13:21 EDT 2009
Author: falcone
Date: Tue May 12 18:13:21 2009
New Revision: 19648
Modified:
rt/3.8/branches/3.8.3-releng/ (props changed)
rt/3.8/branches/3.8.3-releng/lib/RT/Attachment_Overlay.pm (contents, props changed)
rt/3.8/branches/3.8.3-releng/lib/RT/Interface/Email.pm
rt/3.8/branches/3.8.3-releng/share/html/NoAuth/css/web2/ticket-search.css
rt/3.8/branches/3.8.3-releng/share/html/Ticket/Attachment/WithHeaders/dhandler
Log:
r47520 at ketch: falcone | 2009-05-12 18:11:44 -0400
- Merge //mirror/bps-public/rt/3.8/trunk to //local/rt-3.8/3.8.3-releng
Modified: rt/3.8/branches/3.8.3-releng/lib/RT/Attachment_Overlay.pm
==============================================================================
--- rt/3.8/branches/3.8.3-releng/lib/RT/Attachment_Overlay.pm (original)
+++ rt/3.8/branches/3.8.3-releng/lib/RT/Attachment_Overlay.pm Tue May 12 18:13:21 2009
@@ -320,46 +320,6 @@
return $content;
}
-=head2 OriginalHeaders
-
-Returns the attachment's headers as octets before RT's mangling. Currently,
-this just means restoring text headers back to their original encoding.
-
-=cut
-
-sub OriginalHeaders {
- my $self = shift;
-
- return $self->Headers unless RT::I18N::IsTextualContentType($self->ContentType);
- my $enc = $self->OriginalEncoding;
-
- my $headers;
- if ( !$self->ContentEncoding || $self->ContentEncoding eq 'none' ) {
- $headers = $self->_Value('Headers', decode_utf8 => 0);
- } elsif ( $self->ContentEncoding eq 'base64' ) {
- $headers = MIME::Base64::decode_base64($self->_Value('Headers', decode_utf8 => 0));
- } elsif ( $self->ContentEncoding eq 'quoted-printable' ) {
- $headers = MIME::QuotedPrint::decode($self->_Value('Headers', decode_utf8 => 0));
- } else {
- return( $self->loc("Unknown ContentEncoding [_1]", $self->ContentEncoding));
- }
-
- # Turn *off* the SvUTF8 bits here so decode_utf8 and from_to below can work.
- local $@;
- Encode::_utf8_off($headers);
-
- if (!$enc || $enc eq '' || $enc eq 'utf8' || $enc eq 'utf-8') {
- # If we somehow fail to do the decode, at least push out the raw bits
- eval { return( Encode::decode_utf8($headers)) } || return ($headers);
- }
-
- eval { Encode::from_to($headers, 'utf8' => $enc) } if $enc;
- if ($@) {
- $RT::Logger->error("Could not convert attachment headers from assumed utf8 to '$enc' :".$@);
- }
- return $headers;
-}
-
=head2 OriginalEncoding
Returns the attachment's original encoding.
@@ -457,12 +417,8 @@
my $self = shift;
my $entity = new MIME::Entity;
- foreach my $header ($self->SplitHeaders) {
- my ($h_key, $h_val) = split /:/, $header, 2;
- # We need to encode header as RFC 2047, to avoid conflict with
- # OrignalContent Encoding that may break display
- $entity->head->add( $h_key, Encode::encode('MIME-Header', $h_val ) );
- }
+ $entity->head->add( split /:/, $_, 2 )
+ foreach $self->SplitHeaders;
use MIME::Body;
$entity->bodyhandle(
Modified: rt/3.8/branches/3.8.3-releng/lib/RT/Interface/Email.pm
==============================================================================
--- rt/3.8/branches/3.8.3-releng/lib/RT/Interface/Email.pm (original)
+++ rt/3.8/branches/3.8.3-releng/lib/RT/Interface/Email.pm Tue May 12 18:13:21 2009
@@ -622,7 +622,7 @@
);
}
- $mail->head->set( $_ => Encode::encode('MIME-Header', $args{ $_ }) )
+ $mail->head->set( $_ => $args{ $_ } )
foreach grep defined $args{$_}, qw(To Cc Bcc);
$mail->attach(
@@ -643,8 +643,8 @@
$from = $obj->QueueObj->CorrespondAddress
|| RT->Config->Get('CorrespondAddress');
}
- $mail->head->set( Subject => Encode::encode('MIME-Header', "Fwd: $subject") );
- $mail->head->set( From => Encode::encode('MIME-Header', $from) );
+ $mail->head->set( Subject => "Fwd: $subject" );
+ $mail->head->set( From => $from );
my $status = RT->Config->Get('ForwardFromUser')
# never sign if we forward from User
Modified: rt/3.8/branches/3.8.3-releng/share/html/NoAuth/css/web2/ticket-search.css
==============================================================================
--- rt/3.8/branches/3.8.3-releng/share/html/NoAuth/css/web2/ticket-search.css (original)
+++ rt/3.8/branches/3.8.3-releng/share/html/NoAuth/css/web2/ticket-search.css Tue May 12 18:13:21 2009
@@ -197,3 +197,8 @@
float: left;
}
+/* Force some widget to fit at max parent box */
+#HomeRefreshInterval, #SavedSearchLoad, #SavedSearchOwner {
+ max-width: 100%;
+}
+
Modified: rt/3.8/branches/3.8.3-releng/share/html/Ticket/Attachment/WithHeaders/dhandler
==============================================================================
--- rt/3.8/branches/3.8.3-releng/share/html/Ticket/Attachment/WithHeaders/dhandler (original)
+++ rt/3.8/branches/3.8.3-releng/share/html/Ticket/Attachment/WithHeaders/dhandler Tue May 12 18:13:21 2009
@@ -59,18 +59,10 @@
Abort("Couldn't load attachment #$id");
}
- my $content_type = 'text/plain';
- if ( my $enc = $AttachmentObj->OriginalEncoding ) {
- # normalize Encode.pm convention with IANA ones
- $enc = 'big5' if $enc eq 'big5-eten';
- $enc = 'utf-8' if $enc eq 'utf8';
- $content_type .= ";charset=$enc";
- }
-
# XXX: should we check handle html here and integrate headers into html?
- $r->content_type( $content_type );
+ $r->content_type( 'text/plain' );
$m->clear_buffer;
- $m->out( $AttachmentObj->OriginalHeaders );
+ $m->out( $AttachmentObj->Headers );
$m->out( "\n\n" );
$m->out( $AttachmentObj->OriginalContent );
$m->abort;
More information about the Rt-commit
mailing list