Minor template updates

This commit is contained in:
Deon George
2013-10-09 16:41:24 +11:00
parent 696ee7a9e2
commit 45cadf0945
3 changed files with 26 additions and 3 deletions

View File

@@ -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;