
alexmv at bestpractical
Aug 9, 2012, 11:29 AM
Post #1 of 1
(76 views)
Permalink
|
|
rt branch, 4.2/remove-deprecations, updated. rt-4.0.6-457-gb71b6d9
|
|
The branch, 4.2/remove-deprecations has been updated via b71b6d9bf0070248a8158681116b417e12241ac8 (commit) from 1a8944fef8189bcad27dfb8e44c03ec0d2b66c30 (commit) Summary of changes: lib/RT/Attachment.pm | 55 ---------------------------------------------------- 1 file changed, 55 deletions(-) - Log ----------------------------------------------------------------- commit b71b6d9bf0070248a8158681116b417e12241ac8 Author: Alex Vandiver <alexmv [at] bestpractical> Date: Thu Aug 9 14:05:57 2012 -0400 Remove the no-longer-used $attachment->Quote method; use $txn->Content The Quote method, first added to RT::Attachment in d52430f, had its last call site removed in 2e02910 in RT 2.0.10. Remove it, in favor of $txn->Content( Quote => 1), which was added in e184d32. diff --git a/lib/RT/Attachment.pm b/lib/RT/Attachment.pm index 5a1fda6..7a7476e 100644 --- a/lib/RT/Attachment.pm +++ b/lib/RT/Attachment.pm @@ -378,61 +378,6 @@ sub ContentLength { return $len; } -=head2 Quote - -=cut - -sub Quote { - my $self=shift; - my %args=(Reply=>undef, # Prefilled reply (i.e. from the KB/FAQ system) - @_); - - my ($quoted_content, $body, $headers); - my $max=0; - - # TODO: Handle Multipart/Mixed (eventually fix the link in the - # ShowHistory web template?) - if (RT::I18N::IsTextualContentType($self->ContentType)) { - $body=$self->Content; - - # Do we need any preformatting (wrapping, that is) of the message? - - # Remove quoted signature. - $body =~ s/\n-- \n(.*)$//s; - - # What's the longest line like? - foreach (split (/\n/,$body)) { - $max=length if ( length > $max); - } - - if ($max>76) { - require Text::Wrapper; - my $wrapper = Text::Wrapper->new - ( - columns => 70, - body_start => ($max > 70*3 ? ' ' : ''), - par_start => '' - ); - $body=$wrapper->wrap($body); - } - - $body =~ s/^/> /gm; - - $body = '[' . $self->TransactionObj->CreatorObj->Name() . ' - ' . $self->TransactionObj->CreatedAsString() - . "]:\n\n" - . $body . "\n\n"; - - } else { - $body = "[Non-text message not quoted]\n\n"; - } - - $max=60 if $max<60; - $max=70 if $max>78; - $max+=2; - - return (\$body, $max); -} - =head2 ContentAsMIME [Children => 1] Returns MIME entity built from this attachment. ----------------------------------------------------------------------- _______________________________________________ Rt-commit mailing list Rt-commit [at] lists http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-commit
|