summaryrefslogtreecommitdiff
path: root/htetc
diff options
context:
space:
mode:
authorivan <ivan>2003-08-07 13:08:00 +0000
committerivan <ivan>2003-08-07 13:08:00 +0000
commit69ecd0e15d3de36b56ad133d5ae57dcddc53c63e (patch)
treeb00f3c0e3ba3f7e22ff2a832e173f2e9440256c6 /htetc
parentabf5c5442afce5198f6289840791c96f58254e85 (diff)
- turn on profiling with mason like with Apache::ASP (redirects now working)
- fix mason error with new view/cust_main.cgi UI
Diffstat (limited to 'htetc')
-rw-r--r--htetc/global.asa4
-rw-r--r--htetc/handler.pl18
2 files changed, 15 insertions, 7 deletions
diff --git a/htetc/global.asa b/htetc/global.asa
index 21e112e6b..c7056fc03 100644
--- a/htetc/global.asa
+++ b/htetc/global.asa
@@ -137,8 +137,8 @@ if ( defined(@DBIx::Profile::ISA) ) {
my( $self, $location) = @_;
my $page =
$cgi->header.
- qq!<HTML><BODY>Redirect to <A HREF="$location">$location</A><BR><BR>!.
- '<PRE>'.
+ qq!<HTML><BODY>Redirect to <A HREF="$location">$location</A>!.
+ '<BR><BR><PRE>'.
( UNIVERSAL::can(dbh, 'sprintProfile')
? encode_entities(dbh->sprintProfile())
: 'DBIx::Profile missing sprintProfile method;'.
diff --git a/htetc/handler.pl b/htetc/handler.pl
index b28cfe9e2..8f079af33 100644
--- a/htetc/handler.pl
+++ b/htetc/handler.pl
@@ -120,16 +120,24 @@ sub handler
use FS::export_svc;
use FS::msgcat;
- *notCGI::redirect = sub {
+ *CGI::redirect = sub {
my( $self, $location ) = @_;
use vars qw($m);
if ( defined(@DBIx::Profile::ISA) ) { #profiling redirect
- # my $page =
-
-
- # return $page;
+ my $page =
+ qq!<HTML><BODY>Redirect to <A HREF="$location">$location</A>!.
+ '<BR><BR><PRE>'.
+ ( UNIVERSAL::can(dbh, 'sprintProfile')
+ ? encode_entities(dbh->sprintProfile())
+ : 'DBIx::Profile missing sprintProfile method;'.
+ 'unpatched or too old?' ).
+ #"\n\n". &sprintAutoProfile(). '</PRE>'.
+ "\n\n". '</PRE>'.
+ '</BODY></HTML>';
+ dbh->{'private_profile'} = {};
+ return $page;
} else { #normal redirect