summaryrefslogtreecommitdiff
path: root/rt/lib/RT/Transaction_Overlay.pm
diff options
context:
space:
mode:
Diffstat (limited to 'rt/lib/RT/Transaction_Overlay.pm')
-rw-r--r--rt/lib/RT/Transaction_Overlay.pm52
1 files changed, 12 insertions, 40 deletions
diff --git a/rt/lib/RT/Transaction_Overlay.pm b/rt/lib/RT/Transaction_Overlay.pm
index 9e66507..d49e8d3 100644
--- a/rt/lib/RT/Transaction_Overlay.pm
+++ b/rt/lib/RT/Transaction_Overlay.pm
@@ -2,7 +2,7 @@
#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2007 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
# <jesse@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
@@ -22,9 +22,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301 or visit their web page on the internet at
-# http://www.gnu.org/copyleft/gpl.html.
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
# CONTRIBUTION SUBMISSION POLICY:
@@ -45,6 +43,7 @@
# those contributions and any derivatives thereof.
#
# END BPS TAGGED BLOCK }}}
+
=head1 NAME
RT::Transaction - RT\'s transaction object
@@ -83,10 +82,6 @@ use vars qw( %_BriefDescriptions );
use RT::Attachments;
use RT::Scrips;
-use HTML::FormatText;
-use HTML::TreeBuilder;
-
-
# {{{ sub Create
=head2 Create
@@ -289,13 +284,9 @@ sub Content {
);
my $content;
- if (my $content_obj = $self->ContentObj) {
+ my $content_obj = $self->ContentObj;
+ if ($content_obj) {
$content = $content_obj->Content;
-
- if ($content_obj->ContentType =~ m{^text/html$}i) {
- $content = HTML::FormatText->new(leftmargin => 0, rightmargin => 78)->format( HTML::TreeBuilder->new_from_content( $content));
-
- }
}
# If all else fails, return a message that we couldn't find any content
@@ -324,9 +315,11 @@ sub Content {
$content = $wrapper->wrap($content);
}
+ $content = '['
+ . $self->CreatorObj->Name() . ' - '
+ . $self->CreatedAsString() . "]:\n\n" . $content . "\n\n";
$content =~ s/^/> /gm;
- $content = $self->loc("On [_1], [_2] wrote:", $self->CreatedAsString(), $self->CreatorObj->Name())
- . "\n$content\n\n";
+
}
return ($content);
@@ -343,6 +336,7 @@ Returns the RT::Attachment object which contains the content for this Transactio
=cut
+
sub ContentObj {
my $self = shift;
@@ -357,7 +351,7 @@ sub ContentObj {
# If it's a message or a plain part, just return the
# body.
- if ( $Attachment->ContentType() =~ '^(?:text/plain$|text/html|message/)' ) {
+ if ( $Attachment->ContentType() =~ '^(text/plain$|message/)' ) {
return ($Attachment);
}
@@ -373,12 +367,11 @@ sub ContentObj {
return ( $plain_parts->First );
}
-
# If that fails, return the first text/plain or message/ part
# which has some content.
else {
- my $all_parts = $self->Attachments();
+ my $all_parts = $self->Attachments;
while ( my $part = $all_parts->Next ) {
if (( $part->ContentType() =~ '^(text/plain$|message/)' ) && $part->Content() ) {
return ($part);
@@ -806,27 +799,6 @@ sub BriefDescription {
my $self = shift;
return $self->loc("Transaction [_1] purged", $self->Data);
},
- AddReminder => sub {
- my $self = shift;
- my $ticket = RT::Ticket->new($self->CurrentUser);
- $ticket->Load($self->NewValue);
- return $self->loc("Reminder '[_1]' added", $ticket->Subject);
- },
- OpenReminder => sub {
- my $self = shift;
- my $ticket = RT::Ticket->new($self->CurrentUser);
- $ticket->Load($self->NewValue);
- return $self->loc("Reminder '[_1]' reopened", $ticket->Subject);
-
- },
- ResolveReminder => sub {
- my $self = shift;
- my $ticket = RT::Ticket->new($self->CurrentUser);
- $ticket->Load($self->NewValue);
- return $self->loc("Reminder '[_1]' completed", $ticket->Subject);
-
-
- }
);
# }}}