X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=htetc%2Fhandler.pl;h=b44e3f2d4da8f44c2eb073db58fb88ffac3cd250;hp=885c21641392a82d28d29147e8685a71b9312eaf;hb=c2146ae32fdef80049abfa13098db2d45f3ebdd5;hpb=b8cfd0780aa40bb07f3215bf9cb58011f5e32a35 diff --git a/htetc/handler.pl b/htetc/handler.pl index 885c21641..b44e3f2d4 100644 --- a/htetc/handler.pl +++ b/htetc/handler.pl @@ -40,7 +40,7 @@ use vars qw($r); if ( %%%RT_ENABLED%%% ) { eval ' - use lib ("/opt/rt3/local/lib", "/opt/rt3/lib"); + use lib ( "/opt/rt3/local/lib", "/opt/rt3/lib" ); use RT; use vars qw($Nobody $SystemUser); RT::LoadConfig(); @@ -93,27 +93,34 @@ sub handler use Date::Format; use Date::Parse; use Time::Local; + use Time::Duration; use Tie::IxHash; use HTML::Entities; use IO::Handle; use IO::File; + use IO::Scalar; use Net::Whois::Raw qw(whois); if ( $] < 5.006 ) { eval "use Net::Whois::Raw 0.32 qw(whois)"; die $@ if $@; } + use Text::CSV_XS; + use Spreadsheet::WriteExcel; use Business::CreditCard; use String::Approx qw(amatch); use Chart::LinesPoints; use HTML::Widgets::SelectLayers 0.03; + use FS; use FS::UID qw(cgisuidsetup dbh getotaker datasrc driver_name); use FS::Record qw(qsearch qsearchs fields dbdef); use FS::Conf; use FS::CGI qw(header menubar popurl table itable ntable idiot eidiot small_custview myexit http_header); + use FS::UI::Web; use FS::Msgcat qw(gettext geterror); - use FS::Misc qw( send_email ); + use FS::Misc qw( send_email send_fax ); use FS::Report::Table::Monthly; + use FS::TicketSystem; use FS::agent; use FS::agent_type; @@ -122,7 +129,7 @@ sub handler use FS::cust_bill_pay; use FS::cust_credit; use FS::cust_credit_bill; - use FS::cust_main; + use FS::cust_main qw(smart_search); use FS::cust_main_county; use FS::cust_pay; use FS::cust_pkg; @@ -154,6 +161,10 @@ sub handler use FS::part_export_option; use FS::export_svc; use FS::msgcat; + use FS::rate; + use FS::rate_region; + use FS::rate_prefix; + use FS::XMLRPC; if ( %%%RT_ENABLED%%% ) { eval ' @@ -171,12 +182,14 @@ sub handler use RT::CustomFields; use RT::CustomFieldValues; use RT::TicketCustomFieldValues; - + use RT::Interface::Web; use MIME::Entity; use Text::Wrapper; use CGI::Cookie; use Time::ParseDate; + use HTML::Scrubber; + use Text::Quoted; '; die $@ if $@; } @@ -208,11 +221,14 @@ sub handler } }; + + unless ( $HTML::Mason::r->filename =~ /\/rt\/.*NoAuth/ ) { #RT + $cgi = new CGI; + &cgisuidsetup($cgi); + #&cgisuidsetup($r); + $p = popurl(2); + } - $cgi = new CGI; - &cgisuidsetup($cgi); - #&cgisuidsetup($r); - $p = popurl(2); sub include { use vars qw($m); @@ -276,8 +292,8 @@ sub handler RT::Init(); - # We don't need to handle non-text items - return -1 if defined( $r->content_type ) && $r->content_type !~ m|^text/|io; + # 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; } else { $ah->interp->set_escape( 'h' => sub { ${$_[0]}; } ); @@ -296,7 +312,9 @@ sub handler #!! # if ($RT::Handle->TransactionDepth) { # $RT::Handle->ForceRollback; -# $RT::Logger->crit("Transaction not committed. Usually indicates a software fault. Data loss may have occurred") ; +# $RT::Logger->crit( +#"Transaction not committed. Usually indicates a software fault. Data loss may have occurred" +# ); # } $status;