X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fautohandler;h=bdea50534232e66a6d310e37b8ceae1e9b4a3f7f;hb=a54aa62df5076e113134e06e11ba9776c3e60a36;hp=2bd3adffd7ea55b60e341b433dd85ef5c5e851c4;hpb=ef7bb336cc67f127fb1d77532ad3da1369c0ae36;p=freeside.git 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 = ''; } @@ -19,3 +30,6 @@ if ( UNIVERSAL::can(dbh, 'sprintProfile') ) { s/(<\/BODY>[\s\n]*<\/HTML>[\s\n]*)$/$profile$1/i; %filter> +<%cleanup> + dbh->commit(); +%cleanup>'. + encode_entities( $text ). #"\n\n". &sprintAutoProfile(). ''; "\n\n". '