X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fautohandler;fp=httemplate%2Fautohandler;h=e6e50d5bd17cc89cefc7ade2af895f3adf0cc150;hp=0000000000000000000000000000000000000000;hb=abf5c5442afce5198f6289840791c96f58254e85;hpb=117a674a7e37ff2f4f90fcf34710dfad288ac8a9 diff --git a/httemplate/autohandler b/httemplate/autohandler new file mode 100644 index 000000000..e6e50d5bd --- /dev/null +++ b/httemplate/autohandler @@ -0,0 +1,23 @@ +% $m->call_next; + +<%init> + dbh->{'private_profile'} = {} if UNIVERSAL::can(dbh, 'sprintProfile'); + + +<%filter> + +my $profile = ''; +if ( UNIVERSAL::can(dbh, 'sprintProfile') ) { + + #if contenttype is text/html!! **FIXME** + + $profile = '
'. ("\n"x4096). encode_entities(dbh->sprintProfile()).
+               #"\n\n". &sprintAutoProfile(). '
'; + "\n\n". ''; + #endif + + dbh->{'private_profile'} = {}; +} + +s/(<\/BODY>[\s\n]*<\/HTML>[\s\n]*)$/$profile$1/i; +