have the UI use full country names, and state names outside the US...
[freeside.git] / htetc / handler.pl
index 15f9203..008b0b5 100644 (file)
@@ -114,6 +114,7 @@ sub handler
       use String::Approx qw(amatch);
       use Chart::LinesPoints;
       use HTML::Widgets::SelectLayers 0.05;
+      use Locale::Country;
       use FS;
       use FS::UID qw(cgisuidsetup dbh getotaker datasrc driver_name);
       use FS::Record qw(qsearch qsearchs fields dbdef);
@@ -122,7 +123,7 @@ sub handler
                      eidiot small_custview myexit http_header);
       use FS::UI::Web;
       use FS::Msgcat qw(gettext geterror);
-      use FS::Misc qw( send_email send_fax );
+      use FS::Misc qw( send_email send_fax states_hash state_label );
       use FS::Report::Table::Monthly;
       use FS::TicketSystem;
 
@@ -208,6 +209,7 @@ sub handler
         my( $self, $location ) = @_;
         use vars qw($m);
 
+        # false laziness w/below
         if ( defined(@DBIx::Profile::ISA) ) { #profiling redirect
 
           my $page =
@@ -247,10 +249,8 @@ sub handler
 
       sub redirect {
         my( $location ) = @_;
-        warn 'redir1 $m='.$m;
         use vars qw($m);
         $m->clear_buffer;
-        warn 'redir3-prof';
         #false laziness w/above
         if ( defined(@DBIx::Profile::ISA) ) { #profiling redirect
 
@@ -267,14 +267,13 @@ sub handler
           );
           dbh->{'private_profile'} = {};
 
-          warn 'redir9-prof';
-          my $rv = $m->abort(200);
-          warn "redir10-prof: $rv";
-          $rv;
+          #whew.  removing this is all that's needed to fix the annoying
+          #blank-page-instead-of-profiling-redirect-when-called-from-an-include
+          #bug triggered by mason 1.32
+          #my $rv = $m->abort(200);
 
         } else { #normal redirect
 
-          warn 'redir9-redirect';
           $m->redirect($location);
 
         }