e6e50d5bd17cc89cefc7ade2af895f3adf0cc150
[freeside.git] / httemplate / autohandler
1 % $m->call_next;
2
3 <%init>
4   dbh->{'private_profile'} = {} if UNIVERSAL::can(dbh, 'sprintProfile');
5 </%init>
6
7 <%filter>
8
9 my $profile = '';
10 if ( UNIVERSAL::can(dbh, 'sprintProfile') ) {
11
12   #if contenttype is text/html!!  **FIXME**
13
14     $profile = '<PRE>'. ("\n"x4096). encode_entities(dbh->sprintProfile()).
15                #"\n\n". &sprintAutoProfile(). '</PRE>';
16                "\n\n".                        '</PRE>';
17   #endif
18
19   dbh->{'private_profile'} = {};
20 }
21
22 s/(<\/BODY>[\s\n]*<\/HTML>[\s\n]*)$/$profile$1/i;
23 </%filter>