Fixed 404 page appearance

This commit is contained in:
Marcin Kurczewski 2014-03-03 21:46:36 +01:00
parent c633118774
commit 2e3fdf98a0

View file

@ -14,11 +14,11 @@ class Bootstrap
public function workWrapper($workCallback) public function workWrapper($workCallback)
{ {
$this->config->chibi->baseUrl = 'http://' . rtrim($_SERVER['HTTP_HOST'], '/') . '/'; $this->config->chibi->baseUrl = 'http://' . rtrim($_SERVER['HTTP_HOST'], '/') . '/';
session_start(); $this->context->viewDecorators []= new CustomAssetViewDecorator();
$this->context->viewDecorators []= new \Chibi\PrettyPrintViewDecorator();
$this->context->handleExceptions = false;
CustomAssetViewDecorator::setTitle($this->config->main->title); CustomAssetViewDecorator::setTitle($this->config->main->title);
$this->context->handleExceptions = false;
$this->context->json = isset($_GET['json']); $this->context->json = isset($_GET['json']);
$this->context->layoutName = $this->context->json $this->context->layoutName = $this->context->json
? 'layout-json' ? 'layout-json'
@ -26,6 +26,7 @@ class Bootstrap
$this->context->transport = new StdClass; $this->context->transport = new StdClass;
StatusHelper::init(); StatusHelper::init();
session_start();
AuthController::doLogIn(); AuthController::doLogIn();
if (empty($this->context->route)) if (empty($this->context->route))
@ -36,8 +37,6 @@ class Bootstrap
return; return;
} }
$this->context->viewDecorators []= new CustomAssetViewDecorator();
$this->context->viewDecorators []= new \Chibi\PrettyPrintViewDecorator();
try try
{ {
$this->render($workCallback); $this->render($workCallback);