From 98e679e3eb9f09d13938df305cad3f47a5862b9f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Thu, 9 Jul 2015 16:52:56 +0200 Subject: [PATCH] =?utf8?q?Layout/empty:=20empty.json=20und=20emty.html=20e?= =?utf8?q?rm=C3=B6glichen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Controller/Layout.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SL/Controller/Layout.pm b/SL/Controller/Layout.pm index d5d0988f3..e92e861aa 100644 --- a/SL/Controller/Layout.pm +++ b/SL/Controller/Layout.pm @@ -8,7 +8,7 @@ use SL::JSON (); sub action_empty { my ($self) = @_; - if ($::form->{format} eq 'json') { + if ($::form->{format} eq 'json' || $::request->type eq 'json') { my $layout = { pre_content => $::request->{layout}->pre_content, start_content => $::request->{layout}->start_content, @@ -21,6 +21,8 @@ sub action_empty { }; $self->render(\ SL::JSON::to_json($layout), { type => 'json', process => 0 }); + } else { + $self->render(\'', { process => 0 }); } } -- 2.20.1