X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=htetc%2Fhandler.pl;h=e065f092b20e6ac829672cf7caa96bc9ec2dc3f4;hb=04a0d771475412b6f7304257ffea8f12326ae096;hp=af7ac7d5e6810de1b49cfae340c0bef42b45fcc7;hpb=649b07e7ea35f96d814ba1b7020ab07268355ade;p=freeside.git diff --git a/htetc/handler.pl b/htetc/handler.pl index af7ac7d5e..e065f092b 100644 --- a/htetc/handler.pl +++ b/htetc/handler.pl @@ -44,8 +44,8 @@ sub handler ###Module::Refresh->refresh;### - #$r->content_type('text/html; charset=utf-8'); - $r->content_type('text/html; charset=iso-8859-1'); + $r->content_type('text/html; charset=utf-8'); + #$r->content_type('text/html; charset=iso-8859-1'); #eorar my $headers = $r->headers_out; @@ -57,16 +57,17 @@ 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 { @@ -77,7 +78,7 @@ sub handler #we don't want the RT error handlers under FS { - local $^W = 0; + no warnings 'uninitialized'; undef($SIG{__WARN__}) if defined($SIG{__WARN__}); undef($SIG{__DIE__}) if defined($SIG{__DIE__} ); }