X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fautohandler;h=248f14a24211bd65cb765ce7abe8c341532aa6e9;hp=d52b791a752459fa95b3fbd49bc73c0b4ae4e9ea;hb=877a4eb85cb847bd314d6a9192fedb1dc35c5d02;hpb=9b37fb82c94a480ef6af2f7b9a8b889d4381e703 diff --git a/httemplate/autohandler b/httemplate/autohandler index d52b791a7..248f14a24 100644 --- a/httemplate/autohandler +++ b/httemplate/autohandler @@ -1,12 +1,17 @@ % $m->call_next; <%init> + + $FS::Maketext::lh = ''; + dbh->{'private_profile'} = {} if UNIVERSAL::can(dbh, 'sprintProfile'); + <%filter> -my $profile = ''; if ( UNIVERSAL::can(dbh, 'sprintProfile') ) { + my $profile = ''; + if ( lc($r->content_type) =~ /^text\/html/ && $FS::CurrentUser::CurrentUser->option('show_db_profile') ) @@ -35,10 +40,11 @@ if ( UNIVERSAL::can(dbh, 'sprintProfile') ) { } dbh->{'private_profile'} = {}; + + s/(<\/BODY>[\s\n]*<\/HTML>[\s\n]*)/$profile$1/i; } -s/(<\/BODY>[\s\n]*<\/HTML>[\s\n]*)$/$profile$1/i; <%cleanup> - dbh->commit(); + dbh->commit() if dbh;