if ( lc($r->content_type) eq 'text/html' ) {
- # barely worth it, just in case someone tries to use profiling on a
- # non-RT install
- eval "use Text::Wrapper;";
- die $@ if $@;
+ ## barely worth it, just in case someone tries to use profiling on a
+ ## non-RT install
+ #eval "use Text::Wrapper;";
+ #die $@ if $@;
my $wrapper = new Text::Wrapper( columns => 80 );
-
+ my $text = dbh->sprintProfile();
+ #my $text = $wrapper->wrap( dbh->sprintProfile() );
+ $text =~ s/^/ /mg;
+
$profile = '<PRE>'.
- encode_entities( $wrapper->wrap( dbh->sprintProfile() ) ).
+ encode_entities( $text ).
#"\n\n". &sprintAutoProfile(). '</PRE>';
"\n\n". '</PRE>';
}
s/(<\/BODY>[\s\n]*<\/HTML>[\s\n]*)$/$profile$1/i;
</%filter>
+<%cleanup>
+ dbh->commit();
+</%cleanup>