diff --git a/classes/lnApp/Controller/TemplateDefault.php b/classes/lnApp/Controller/TemplateDefault.php index ff9e899..186a954 100644 --- a/classes/lnApp/Controller/TemplateDefault.php +++ b/classes/lnApp/Controller/TemplateDefault.php @@ -85,7 +85,10 @@ abstract class lnApp_Controller_TemplateDefault extends Kohana_Controller_Templa if ($this->request->is_ajax()) throw HTTP_Exception::factory(403,_('You dont have enough permissions.')); else - HTTP::redirect('login/noaccess'); + if (! Kohana::$config->load('debug')->disabled_noaccess_redirect) + HTTP::redirect('login/noaccess'); + else + throw HTTP_Exception::factory(501,'I would redirect you here - no ACCESS'); } else { Session::instance()->set('afterlogin',Request::detect_uri()); @@ -150,8 +153,8 @@ abstract class lnApp_Controller_TemplateDefault extends Kohana_Controller_Templa $output = Style::factory()->render_all(); $output .= Script::factory()->render_all(); - if (! isset($this->template->content) AND $this->response->body()) - $output .= $this->response->body(); + if (! isset($this->template->content)) + $output .= $this->response->body() ? $this->response->body() : ''; else $output .= $this->template->content; diff --git a/views/theme/baseadmin/page.php b/views/theme/baseadmin/page.php index f90ceaf..7ccb9aa 100644 --- a/views/theme/baseadmin/page.php +++ b/views/theme/baseadmin/page.php @@ -71,6 +71,11 @@