X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fautohandler;h=bdea50534232e66a6d310e37b8ceae1e9b4a3f7f;hb=c648976f0b7975f2328ebd7ba8c711fad0ca4195;hp=a3f7eb0086db5a097cbdd7751c852aa965fb6473;hpb=e74ef43f87208638dd1a01073e819c053d0783f4;p=freeside.git diff --git a/httemplate/autohandler b/httemplate/autohandler index a3f7eb008..bdea50534 100644 --- a/httemplate/autohandler +++ b/httemplate/autohandler @@ -9,7 +9,18 @@ if ( UNIVERSAL::can(dbh, 'sprintProfile') ) { if ( lc($r->content_type) eq 'text/html' ) { - $profile = '
'. encode_entities(dbh->sprintProfile()).
+    ## 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 = '
'.
+               encode_entities( $text ).
                #"\n\n". &sprintAutoProfile(). '
'; "\n\n". '
'; } @@ -19,3 +30,6 @@ if ( UNIVERSAL::can(dbh, 'sprintProfile') ) { s/(<\/BODY>[\s\n]*<\/HTML>[\s\n]*)$/$profile$1/i; +<%cleanup> + dbh->commit(); +