X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fautohandler;h=bdea50534232e66a6d310e37b8ceae1e9b4a3f7f;hp=2bd3adffd7ea55b60e341b433dd85ef5c5e851c4;hb=444d079fa0fb2f09c080b58f6b1a5fed37ffd7c1;hpb=b8cfd0780aa40bb07f3215bf9cb58011f5e32a35 diff --git a/httemplate/autohandler b/httemplate/autohandler index 2bd3adffd..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 = '
'. ("\n"x4096). 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(); +