X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=htetc%2Fhandler.pl;h=eb9e67ee5f47d39ec8f164ba51a390a2544e6af4;hb=d66bff648dd4d7969f50f956b5c1dd06b8159b8c;hp=a9431d3a8847006120cb118a8e91ad8abb25dd49;hpb=70569273833d91085c6c562865a78a08ddde49a1;p=freeside.git diff --git a/htetc/handler.pl b/htetc/handler.pl index a9431d3a8..eb9e67ee5 100644 --- a/htetc/handler.pl +++ b/htetc/handler.pl @@ -44,7 +44,8 @@ sub handler ###Module::Refresh->refresh;### - $r->content_type('text/html'); + #$r->content_type('text/html; charset=utf-8'); + $r->content_type('text/html; charset=iso-8859-1'); #eorar my $headers = $r->headers_out; @@ -56,21 +57,32 @@ sub handler if ( $r->filename =~ /\/rt\// ) { #RT - $ah->interp($rt_interp); + # We don't need to handle non-text, non-xml items + return -1 if defined( $r->content_type ) + && $r->content_type !~ m!(^text/|\bxml\b)!io; + local $SIG{__WARN__}; local $SIG{__DIE__}; RT::Init(); - # We don't need to handle non-text, non-xml items - return -1 if defined( $r->content_type ) - && $r->content_type !~ m!(^text/|\bxml\b)!io; + $ah->interp($rt_interp); } else { + local $SIG{__WARN__}; + local $SIG{__DIE__}; + RT::Init() if $RT::VERSION; #for lack of something else + #we don't want the RT error handlers under FS + { + no warnings 'uninitialized'; + undef($SIG{__WARN__}) if defined($SIG{__WARN__}); + undef($SIG{__DIE__}) if defined($SIG{__DIE__} ); + } + $ah->interp($fs_interp); }