diff options
author | Ivan Kohler <ivan@freeside.biz> | 2016-11-11 11:42:54 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2016-11-11 11:42:54 -0800 |
commit | 287b33b072a38c08535bc0c300ea48e0a587190c (patch) | |
tree | 97f1a03a6e56fe7aa21eafe9d6da1f638e37b52b /FS | |
parent | 70c70dbaa188bd8c8c9850657c1cd8d5a61cc8c5 (diff) |
UX: add status to package actions, redirect back to package tab
Diffstat (limited to 'FS')
-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 cbb73f4d9..414e1fa50 100644 --- a/FS/FS/Mason.pm +++ b/FS/FS/Mason.pm @@ -468,15 +468,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 ) { |