X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FController%2FBase.pm;h=5e0fd26cb5a9aff6e223dbc649ef008b5a602239;hb=5efe13905a6ef7dbd22650cc9c1c17a246277484;hp=b8f53e96a855c4100212b111469d3f4866b7a05d;hpb=be944d27c902dc71bdf0246dc8cfe0137c4e43ea;p=kivitendo-erp.git diff --git a/SL/Controller/Base.pm b/SL/Controller/Base.pm index b8f53e96a..5e0fd26cb 100644 --- a/SL/Controller/Base.pm +++ b/SL/Controller/Base.pm @@ -75,6 +75,7 @@ sub render { header => 1, layout => 1, process => 1, + status => '200 ok', ); $options->{$_} //= $defaults{$_} for keys %defaults; $options->{type} = lc $options->{type}; @@ -131,7 +132,8 @@ sub render { : 'application/json'; print $::form->create_http_response(content_type => $content_type, - charset => 'UTF-8'); + charset => 'UTF-8', + (status => $options->{status}) x !!$options->{status}); } } @@ -159,7 +161,8 @@ sub send_file { if ($::request->is_ajax || $params{ajax}) { my $octets = ref $file_name_or_content ? $file_name_or_content : \ do { local $/ = undef; <$file> }; - $self->js->save_file(MIME::Base64::encode_base64($$octets), $content_type, $size, $attachment_name)->render; + $self->js->save_file(MIME::Base64::encode_base64($$octets), $content_type, $size, $attachment_name); + $self->js->render unless $params{js_no_render}; } else { print $::form->create_http_response(content_type => $content_type, content_disposition => 'attachment; filename="' . $attachment_name . '"',