X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FMason.pm;h=ed3b66c1292874fd49bb1898b7036e8bcb6eb189;hb=aaeae8f7ff06576507bb81af48e4868d84db819b;hp=cbb73f4d927fef59db72a1fd31e897861ba083f7;hpb=17e0ba08c98efa2e0173995ae9502a498b950a65;p=freeside.git diff --git a/FS/FS/Mason.pm b/FS/FS/Mason.pm index cbb73f4d9..ed3b66c12 100644 --- a/FS/FS/Mason.pm +++ b/FS/FS/Mason.pm @@ -45,7 +45,7 @@ if ( -e $addl_handler_use_file ) { use strict; use vars qw( %session ); - use CGI 3.39 qw(-private_tempfiles); #3.39 for cpan#37365 + use CGI 4.08 qw(-private_tempfiles); #4.08 for multi_param #use CGI::Carp qw(fatalsToBrowser); use CGI::Cookie; @@ -118,6 +118,7 @@ if ( -e $addl_handler_use_file ) { #use FS::geocode_Mixin; #for its code2country use Locale::Currency; use Locale::Currency::Format; + use Number::Phone::Country qw( noexport ); use Business::US::USPS::WebTools::AddressStandardization; use Geo::GoogleEarth::Pluggable; use LWP::UserAgent; @@ -415,6 +416,7 @@ if ( -e $addl_handler_use_file ) { use FS::access_user_page_pref; use FS::part_svc_msgcat; use FS::saved_search; + use FS::svc_group; # Sammath Naur if ( $FS::Mason::addl_handler_use ) { @@ -468,15 +470,19 @@ if ( -e $addl_handler_use_file ) { no warnings 'redefine'; *CGI::redirect = sub { my $self = shift; - my $cookie = ''; - if ( $_[0] eq '-cookie' ) { #this isn't actually used at the moment - (my $x, $cookie) = (shift, shift); - $HTML::Mason::r->err_headers_out->add( 'Set-cookie' => $cookie ); - } - my $location = shift; use vars qw($m); + my $location = ''; + if ( $_[0] =~ /^-/ ) { + my %opt = @_; + $location = $opt{'-uri'}; + my $cookie = $opt{'-cookie'}; + $m->apache_req->err_headers_out->{'Set-cookie'} = $cookie if $cookie; + } else { + $location = shift; + } + # false laziness w/below if ( @DBIx::Profile::ISA ) {