From abf5c5442afce5198f6289840791c96f58254e85 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 7 Aug 2003 12:47:27 +0000 Subject: - switch to mason by default - minimum mason version 1.1 (and doc) - evaluate .html files with mason/asp - turn on profiling with mason like with Apache::ASP (redirects not working) - (start of) includes --- httemplate/autohandler | 23 +++++++++++++++++++++++ httemplate/docs/install.html | 10 +++++----- httemplate/docs/upgrade10.html | 2 +- httemplate/index.html | 2 +- 4 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 httemplate/autohandler (limited to 'httemplate') 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; + diff --git a/httemplate/docs/install.html b/httemplate/docs/install.html index 54614ccb3..463575c53 100644 --- a/httemplate/docs/install.html +++ b/httemplate/docs/install.html @@ -130,8 +130,8 @@ cp htetc/global.asa /usr/local/etc/freeside/asp-global/global.asa
 PerlModule Apache::ASP
 <Directory /usr/local/apache/htdocs/freeside-asp>
-<Files ~ (\.cgi)>
-AddHandler perl-script .cgi
+<Files ~ (\.cgi|\.html)>
+SetHandler perl-script
 PerlHandler Apache::ASP
 </Files>
 <Perl>
@@ -145,7 +145,7 @@ PerlSetVar Debug 2
     
  • Run make masondocs
  • Copy masondocs/ to your web server's document space. (For example: /usr/local/apache/htdocs/freeside-mason) -
  • Copy htetc/handler.pl to /usr/local/etc/freeside (use htetc/handler.pl-1.0x for Mason versions before 1.10). +
  • Copy htetc/handler.pl to /usr/local/etc/freeside
  • Edit handler.pl and:
    • set an appropriate comp_root, such as /usr/local/apache/htdocs/freeside-mason @@ -156,8 +156,8 @@ PerlSetVar Debug 2
       PerlModule HTML::Mason
       <Directory /usr/local/apache/htdocs/freeside-mason>
      -<Files ~ (\.cgi)>
      -AddHandler perl-script .cgi
      +<Files ~ (\.cgi|.html)>
      +SetHandler perl-script
       PerlHandler HTML::Mason
       </Files>
       <Perl>
      diff --git a/httemplate/docs/upgrade10.html b/httemplate/docs/upgrade10.html
      index 4c2c17b85..d7a8c7468 100644
      --- a/httemplate/docs/upgrade10.html
      +++ b/httemplate/docs/upgrade10.html
      @@ -99,6 +99,6 @@ dbdef-create username
       create-history-tables username cust_bill_pkg_detail router part_svc_router addr_block svc_broadband
       dbdef-create username
       
      -
      +apache - fix  sections to include .html also
       
       
      diff --git a/httemplate/index.html b/httemplate/index.html index 3e87af716..99b321f30 100644 --- a/httemplate/index.html +++ b/httemplate/index.html @@ -12,7 +12,7 @@ freeside main menu version %%%VERSION%%% -
      Freeside home page +
      Freeside home page
      Documentation -- cgit v1.2.1