diff options
author | Ivan Kohler <ivan@freeside.biz> | 2016-11-11 11:42:45 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2016-11-11 11:42:45 -0800 |
commit | 4afceb55388ffa32d18c2b821fda11027540dce5 (patch) | |
tree | 09a1635a519b3eee0f5f0b1b8253c39660258ba1 /FS/FS/Mason.pm | |
parent | 7118f8f027744b31c87444da0a47de3b1daa5da2 (diff) |
UX: add status to package actions, redirect back to package tab
Diffstat (limited to 'FS/FS/Mason.pm')
-rw-r--r-- | FS/FS/Mason.pm | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/FS/FS/Mason.pm b/FS/FS/Mason.pm index cb195a0..89140ca 100644 --- a/FS/FS/Mason.pm +++ b/FS/FS/Mason.pm @@ -471,15 +471,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 ) { |